示例#1
0
 void initAnimation()
 {
     var border = this.GetTemplateElement<Border>("border");
     borderColorAnimator = new ReversibleAnimator<Color>(
         border.BorderBrush,
         SolidColorBrush.ColorProperty,
         Config.ProgressorColor,
         Config.ProgressorSelectedColor,
         Config.ProgressorFadeDuration);
 }
示例#2
0
 void initializeWindowFading()
 {
     windowFadeAnimator = new ReversibleAnimator<double>(
         this,
         OpacityProperty,
         0,
         1,
         Config.WindowFadeDuration);
     windowFadeAnimator.StartReached += onWindowFadeOut;
     windowFadeAnimator.EndReached += onWindowFadeIn;
 }
示例#3
0
        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);
        }