private Storyboard GetNormalScreenStory() { DoubleAnimation anix = StoryboardFactory.CreateDoubleAnimation(this.gdAnimationView, animationTime, null, 1.0, StoryboardFactory.ScareX); DoubleAnimation aniy = StoryboardFactory.CreateDoubleAnimation(this.gdAnimationView, animationTime, null, 1.0, StoryboardFactory.ScareY); DoubleAnimation opacity = StoryboardFactory.CreateDoubleAnimation(this.recBack, animationTime, 0.0, 1.0, StoryboardFactory.Opacity); Storyboard sb = new Storyboard(); sb.Children.Add(anix); sb.Children.Add(aniy); sb.Children.Add(opacity); return(sb); }
private Storyboard GetFullScreenStory() { double xRage = this.FullScreenPanel.ActualWidth / this.gdAnimationView.Width; double yRage = this.FullScreenPanel.ActualHeight / this.gdAnimationView.Height; this.normalWidth = this.gdAnimationView.ActualWidth; this.normalHeight = this.gdAnimationView.ActualHeight; DoubleAnimation anix = StoryboardFactory.CreateDoubleAnimation(this.gdAnimationView, animationTime, 1, xRage, StoryboardFactory.ScareX); DoubleAnimation aniy = StoryboardFactory.CreateDoubleAnimation(this.gdAnimationView, animationTime, 1, yRage, StoryboardFactory.ScareY); DoubleAnimation opacity = StoryboardFactory.CreateDoubleAnimation(this.recBack, animationTime, 1, 0.0, StoryboardFactory.Opacity); Storyboard sb = new Storyboard(); sb.Children.Add(anix); sb.Children.Add(aniy); sb.Children.Add(opacity); return(sb); }
private void AnimateWrapper(double depth = -600, TimeSpan?stagger = null) { wrapper.Children.Clear(); wrapper.Width = 170 * 3; ThemeShadow s = new ThemeShadow(); s.Receivers.Add(ShadowRoot); foreach (var i in Enumerable.Range(0, 9)) { wrapper.Children.Add(new Rectangle { Margin = new Thickness(8), Height = 150, Width = 150, Fill = new SolidColorBrush(Utils.GetRandomColor()), Shadow = s }); } StoryboardFactory.CreateDepth3DIn(wrapper.Children.Cast <FrameworkElement>().OrderBy(f => Guid.NewGuid()), wrapper, depth, customStagger: stagger).Begin(); }
private void Button_Click_3(object sender, RoutedEventArgs e) { StoryboardFactory.CreateDepth3DOut(wrapper.Children.Cast <FrameworkElement>().OrderBy(f => Guid.NewGuid()), wrapper, 300).Begin(); }