Ejemplo n.º 1
0
        public void Screen_Loaded(object sender, RoutedEventArgs e)
        {
            ColorAnimation animation;

            animation                = new ColorAnimation();
            animation.To             = Colors.Transparent;
            animation.Duration       = new Duration(TimeSpan.FromSeconds(0.5));
            animation.AutoReverse    = true;
            animation.RepeatBehavior = RepeatBehavior.Forever;
            PressAnyKeyTextBlockBrush.BeginAnimation(SolidColorBrush.ColorProperty, animation);
        }
Ejemplo n.º 2
0
        public void Flash_Text(EventHandler callback)
        {
            ColorAnimation animation;

            animation                = new ColorAnimation();
            animation.To             = Colors.Transparent;
            animation.Duration       = new Duration(TimeSpan.FromSeconds(0.05));
            animation.AutoReverse    = true;
            animation.RepeatBehavior = new RepeatBehavior(3);
            animation.Completed     += callback;
            PressAnyKeyTextBlockBrush.BeginAnimation(SolidColorBrush.ColorProperty, animation);
        }