Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 1.92 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Binding EasingColorKeyframe Value
  2. <ColorAnimationUsingKeyFrames  RepeatBehavior="Forever" Storyboard.TargetProperty="(TextElement.Foreground).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="mainToggleButton">
  3.             <EasingColorKeyFrame KeyTime="0:0:0.2" Value="{Binding RelativeSource={RelativeSource Self}, Path=LowColor}"/>
  4.             <EasingColorKeyFrame KeyTime="0:0:0.4" Value="{Binding RelativeSource={RelativeSource Self}, Path=HighColor}"/>
  5.             <EasingColorKeyFrame KeyTime="0:0:0.8" Value="{Binding RelativeSource={RelativeSource Self}, Path=HighColor}"/>
  6.             <EasingColorKeyFrame KeyTime="0:0:1"   Value="{Binding RelativeSource={RelativeSource Self}, Path=LowColor}"/>
  7.             <EasingColorKeyFrame KeyTime="0:0:1.4" Value="{Binding RelativeSource={RelativeSource Self}, Path=HighColor}"/>
  8.             </ColorAnimationUsingKeyFrames>
  9.        
  10. [Category("Flash")]
  11.         public Brush HighColor
  12.         {
  13.             get { return (Brush)GetValue(HighColorProperty); }
  14.             set { SetValue(HighColorProperty, value); }
  15.         }
  16.  
  17.         // Using a DependencyProperty as the backing store for HighColor.  This enables animation, styling, binding, etc...
  18.         public static readonly DependencyProperty HighColorProperty =
  19.             DependencyProperty.Register("HighColor", typeof(Brush), typeof(AttentionControl), new UIPropertyMetadata(Brushes.LightGreen));
  20.  
  21.  
  22.         [Category("Flash")]
  23.         public Brush LowColor
  24.         {
  25.             get { return (Brush)GetValue(LowColorProperty); }
  26.             set { SetValue(LowColorProperty, value); }
  27.         }
  28.  
  29.         // Using a DependencyProperty as the backing store for LowColor.  This enables animation, styling, binding, etc...
  30.         public static readonly DependencyProperty LowColorProperty =
  31.             DependencyProperty.Register("LowColor", typeof(Brush), typeof(AttentionControl), new UIPropertyMetadata(Brushes.DarkGreen));