<UserControl x:Class="ApSilverlight.SilverlightTransformAnimada"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="300" Width="400">

  <Grid x:Name="LayoutRoot" Background="White">
    <Grid.Resources>
      <Storyboard x:Name="sbRotacionHexagono">
        <DoubleAnimation
            Storyboard.TargetName="transforHexagono" 
            Storyboard.TargetProperty="Angle"
            To="360" Duration="0:0:8"
            RepeatBehavior="Forever"
          />
      </Storyboard>
      <Storyboard x:Name="sbPararRotHexagono" Completed="sbPararRotHexagono_Completed">
        <DoubleAnimation
            Storyboard.TargetName="transforHexagono" 
            Storyboard.TargetProperty="Angle"
            Duration="0:0:0.6"
          />
      </Storyboard>
    </Grid.Resources>
    <Grid.RowDefinitions>
      <RowDefinition />
      <RowDefinition Height="200" />
    </Grid.RowDefinitions>

    <StackPanel Orientation="Horizontal" Margin="5"
                VerticalAlignment="Top" HorizontalAlignment="Center">
      <Button Click="Inicio_Click"
        Width="65" Height="24" Margin="2" Content="Inicio" />
      <Button Click="Pausa_Click"
        Width="65" Height="24" Margin="2" Content="Pausa" />
      <Button Click="Continuar_Click"
        Width="65" Height="24" Margin="2" Content="Continuar" />
      <Button Click="Parar_Click"
        Width="65" Height="24" Margin="2" Content="Parar" />
    </StackPanel>

    <Polygon Grid.Row="1" x:Name="Hexagono"
             Points="100,50 200,0 300,50 300,150 200,200 100,150 100,50"
             Stroke="Blue" Fill="LightBlue">
      <Polygon.RenderTransform>
        <RotateTransform x:Name="transforHexagono" CenterX="200" CenterY="100" />
      </Polygon.RenderTransform>
    </Polygon>
  </Grid>
</UserControl>
