<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      HorizontalAlignment="Center" VerticalAlignment="Center">

<Canvas>
  <Canvas.Resources>
    <PathGeometry x:Key="animPath"
                  Figures="M 0,30 A 30,30 180 0 1 60,30  30,30 180 0 1 0,30" />
  </Canvas.Resources>

  <Path Stroke="Blue" StrokeThickness="2" Data="{StaticResource animPath}" />

<!-- Example 16-31. Matrix animation with path -->
 
<Path Stroke="Black" StrokeThickness="2" Data="M0,0 H20 M15,-5 L20,0 15,5">
  <Path.RenderTransform>
    <MatrixTransform />
  </Path.RenderTransform>

  <Path.Triggers>
    <EventTrigger RoutedEvent="Line.Loaded">
      <BeginStoryboard>
        <Storyboard>

          <MatrixAnimationUsingPath DoesRotateWithTangent="True"
              RepeatBehavior="Forever" Duration="0:0:5"
              Storyboard.TargetProperty="
                    (Path.RenderTransform).(MatrixTransform.Matrix)"
                PathGeometry="{StaticResource animPath}" />

        </Storyboard>
      </BeginStoryboard>
    </EventTrigger>
  </Path.Triggers>
</Path>

</Canvas>

<!-- End of Example 16-31. -->

</Page>
