示例#1
0
        /// <summary>
        /// Handles the Completed event of the SlidingBarStoryboard control.
        /// </summary>
        /// <param name="mousePosition">Absolute mouse position.</param>
        private void SlidingBarStoryboardCompleted(Point mousePosition)
        {
            // Find selected icon
            var selectedIcon = (from item in carousel.FindElementsInCoordinates(mousePosition).OfType <WindowIcon>()
                                select item).FirstOrDefault();

            // Select an icon in mouse position
            foreach (var icon in carousel.Children.OfType <WindowIcon>())
            {
                icon.Selected = selectedIcon != null && icon == selectedIcon;
            }
        }