Esempio n. 1
0
        private void MainPage_GotFocus(object sender, RoutedEventArgs e)
        {
            FrameworkElement focus = FocusManager.GetFocusedElement() as FrameworkElement;

            if (focus != null)
            {
                if (focus.GetType() == typeof(GridViewItem))
                {
                    control = ((focus.FindDescendantByName("TemplateRoot")) as Grid);
                    if (control != null)
                    {
                        try
                        {
                            SoundItemAnimations.ItemScaleUp(control, 1.1f);
                        }
                        catch
                        {
                        }
                    }
                }
                focus.LostFocus += (f, g) =>
                {
                    if (focus.GetType() == typeof(GridViewItem))
                    {
                        control = ((focus.FindDescendantByName("TemplateRoot")) as Grid);
                        if (control != null)
                        {
                            try
                            {
                                SoundItemAnimations.ItemScaleNormal(control);
                            }
                            catch
                            {
                            }
                        }
                    }
                };
            }
        }
Esempio n. 2
0
 private void GridScaleNormal(object sender, PointerRoutedEventArgs e) => SoundItemAnimations.ItemScaleNormal(sender as UIElement);
Esempio n. 3
0
 private void GridScaleUp(object sender, PointerRoutedEventArgs e) => SoundItemAnimations.ItemScaleUp(sender as UIElement, 1.1f, e.Pointer);
Esempio n. 4
0
 public static void GridScaleNormal(object sender, PointerRoutedEventArgs e)
 => SoundItemAnimations.ItemScaleNormal((UIElement)sender);