/// <summary> /// Gets the Tumbler (grid) that currently contains the mouse. Useful for forwarding mouse events to the specific tumbler. /// </summary> /// <returns>the Grid (itemsGrid) that contains the mouse pointer</returns> private Grid getTargetTumbler() { Grid targetTumbler = null; for (int i = 0; i < this.Tumblers.Count; ++i) { Border foundTumbler = this.mainGrid.FindChild <Border>("tumblerBorder", i); if (foundTumbler != null && foundTumbler.ContainsMouse()) { targetTumbler = foundTumbler.FindChild <Grid>("itemsGrid", 0); break; } } return(targetTumbler); }