private static void ShowDownAnimation(UIElement element) { var animation = new PointerDownThemeAnimation(); Storyboard.SetTarget(animation, element); var storyboard = new Storyboard(); storyboard.Children.Add(animation); storyboard.Begin(); }
private static void DisplayDownAnimation(DependencyObject sender) { if (sender != null && !GetIsDown(sender)) { Storyboard sb = new Storyboard(); PointerDownThemeAnimation animation = new PointerDownThemeAnimation(); Storyboard.SetTarget(animation, sender as FrameworkElement); sb.Children.Add(animation); sb.Begin(); SetIsDown(sender, true); } }
private void CreatePointerDownStoryboard() { _pointerDownAnimation = new PointerDownThemeAnimation(); Storyboard.SetTarget(_pointerDownAnimation, _contentGrid); _pointerDownStoryboard = new Storyboard(); _pointerDownStoryboard.Children.Add(_pointerDownAnimation); }