void initAnimation() { var border = this.GetTemplateElement<Border>("border"); borderColorAnimator = new ReversibleAnimator<Color>( border.BorderBrush, SolidColorBrush.ColorProperty, Config.ProgressorColor, Config.ProgressorSelectedColor, Config.ProgressorFadeDuration); }
void initializeWindowFading() { windowFadeAnimator = new ReversibleAnimator<double>( this, OpacityProperty, 0, 1, Config.WindowFadeDuration); windowFadeAnimator.StartReached += onWindowFadeOut; windowFadeAnimator.EndReached += onWindowFadeIn; }
void initializeBorderFading() { // Use different active border color based on whether the program // has elevated permissions. var activeBorderColor = EnvUtils.IsAdmin ? Config.ActiveBorderColorElevated : Config.ActiveBorderColor; borderFadeAnimator = new ReversibleAnimator<Color>( BorderBrush, SolidColorBrush.ColorProperty, Config.InactiveBorderColor, activeBorderColor, Config.BorderFadeDuration); }