private void LeaveAvatorMask(object Sender, MouseEventArgs E) { MaskEllipse.BeginAnimation(OpacityProperty, new DoubleAnimation() { From = MaskEllipse.Opacity, To = 0, Duration = TimeSpan.FromSeconds(0.25), EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseInOut }, }); }
public void PageLeave() { DispatcherTimer Timer = new DispatcherTimer(); Timer.Interval = TimeSpan.FromSeconds(0.5); Timer.Tick += delegate { LeaveAction?.Invoke(); Timer.Stop(); }; AvatorEllipse.BeginAnimation(OpacityProperty, new DoubleAnimation() { From = AvatorEllipse.Opacity, To = 0, Duration = TimeSpan.FromSeconds(0.5), EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseIn }, }); MaskEllipse.BeginAnimation(OpacityProperty, new DoubleAnimation() { From = MaskEllipse.Opacity, To = 0, Duration = TimeSpan.FromSeconds(0.5), EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseIn }, }); NameLabel.BeginAnimation(OpacityProperty, new DoubleAnimation() { From = NameLabel.Opacity, To = 0, Duration = TimeSpan.FromSeconds(0.5), EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseIn }, }); NameBox.BeginAnimation(OpacityProperty, new DoubleAnimation() { From = NameBox.Opacity, To = 0, Duration = TimeSpan.FromSeconds(0.5), EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseIn }, }); DescriptionLabel.BeginAnimation(OpacityProperty, new DoubleAnimation() { From = DescriptionLabel.Opacity, To = 0, Duration = TimeSpan.FromSeconds(0.5), EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseIn }, }); DescriptionBox.BeginAnimation(OpacityProperty, new DoubleAnimation() { From = DescriptionBox.Opacity, To = 0, Duration = TimeSpan.FromSeconds(0.5), EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseIn }, }); BackButton.BeginAnimation(OpacityProperty, new DoubleAnimation() { From = BackButton.Opacity, To = 0, Duration = TimeSpan.FromSeconds(0.5), EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseIn }, }); SignupButton.BeginAnimation(OpacityProperty, new DoubleAnimation() { From = SignupButton.Opacity, To = 0, Duration = TimeSpan.FromSeconds(0.5), EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseIn }, }); StatusBar.BeginAnimation(OpacityProperty, new DoubleAnimation() { From = StatusBar.Opacity, To = 0, Duration = TimeSpan.FromSeconds(0.5), EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseIn }, }); Timer.Start(); }