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

<Ellipse Height="100" Width="200">
  <Ellipse.Fill>
    <LinearGradientBrush x:Name="gradientBrush" StartPoint="0,0" EndPoint="1,0">
      <GradientStop Color="Red" />
      <GradientStop Color="Black" Offset="0.5" />
      <GradientStop Color="Blue" Offset="1" />
    </LinearGradientBrush>
  </Ellipse.Fill>

  <Ellipse.Triggers>
    <EventTrigger RoutedEvent="Ellipse.Loaded">
      <BeginStoryboard>
        <Storyboard>

<!-- Example 16-15. Animation path with index -->

<ColorAnimation Storyboard.TargetName="gradientBrush"
    Storyboard.TargetProperty="
        (LinearGradientBrush.GradientStops)[2].(GradientStop.Color)"
    To="Green" Duration="0:0:4" />


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

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

</Page>
