Mega Code Archive

 
Categories / C# / WPF
 

Discrete Point Jumps

<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">     <Path Fill="Red">         <Path.Data>             <EllipseGeometry x:Name="elips" RadiusX="24" RadiusY="24" />         </Path.Data>     </Path>     <Canvas.Triggers>         <EventTrigger RoutedEvent="Canvas.Loaded">             <BeginStoryboard>                 <Storyboard TargetName="elips" TargetProperty="Center">                     <PointAnimationUsingKeyFrames Duration="0:0:4"                                                   RepeatBehavior="Forever">                         <DiscretePointKeyFrame KeyTime="0:0:0" Value="288 96" />                         <DiscretePointKeyFrame KeyTime="0:0:3" Value="96 288" />                     </PointAnimationUsingKeyFrames>                 </Storyboard>             </BeginStoryboard>         </EventTrigger>     </Canvas.Triggers> </Canvas>