Mega Code Archive

 
Categories / VB.Net / WPF
 

Point path animation

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"       HorizontalAlignment="Stretch" VerticalAlignment="Stretch">     <Path Stroke="Black" StrokeThickness="4">       <Path.Data>         <LineGeometry StartPoint="50,50" EndPoint="0,0" />       </Path.Data>       <Path.Triggers>         <EventTrigger RoutedEvent="Path.Loaded">           <BeginStoryboard>             <Storyboard>               <PointAnimationUsingPath AutoReverse="True"                      RepeatBehavior="Forever" Duration="0:0:2"                     Storyboard.TargetProperty="(Path.Data).(LineGeometry.EndPoint)">                 <PointAnimationUsingPath.PathGeometry>                   <PathGeometry Figures="M 14,14 A 50,50 90, 0 1 85,14" />                 </PointAnimationUsingPath.PathGeometry>               </PointAnimationUsingPath>             </Storyboard>           </BeginStoryboard>         </EventTrigger>       </Path.Triggers>     </Path>      </Page>