Mega Code Archive

 
Categories / C# / WPF
 

Color Animation

<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         Background="Red">     <Canvas.Triggers>         <EventTrigger RoutedEvent="Canvas.Loaded">             <BeginStoryboard>                 <Storyboard TargetProperty="Background.Color">                     <ColorAnimationUsingKeyFrames RepeatBehavior="Forever">                         <LinearColorKeyFrame KeyTime="0:0:0" Value="Red" />                         <LinearColorKeyFrame KeyTime="0:0:1" Value="Orange" />                         <LinearColorKeyFrame KeyTime="0:0:7" Value="Red" />                     </ColorAnimationUsingKeyFrames>                 </Storyboard>             </BeginStoryboard>         </EventTrigger>     </Canvas.Triggers> </Canvas>