public ScreenBase ( ) : base ( ) { this.DrawOrder = 1; this.Visible = false; this.VerticalAlignment = VerticalAlignment.Stretch; this.HorizontalAlignment = HorizontalAlignment.Stretch; this.Width = ScreenHelper.ORIGINAL_WIDTH; this.Height = ScreenHelper.ORIGINAL_HEIGHT; this.ScissorTest = false; this.HitTestEnabled = true; fadeAnimation = new SingleAnimation ( 0, 1, TimeSpan.FromMilliseconds ( 300 ), false ); fadeAnimation.Completed += delegate { if ( hiding ) { this.Visible = false; this.IsEnabled = false; if ( this.Closed != null ) this.Closed ( this, EventArgs.Empty ); } else { this.IsEnabled = true; if ( this.Open != null ) this.Open ( this, EventArgs.Empty ); } }; }
private static void AnimationFunction_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e) { SingleAnimation a = (SingleAnimation)d; a._isAnimationFunctionValid = false; a.PropertyChanged(e.Property); }