Partial Public Class SilverlightTransformAnimada
  Inherits UserControl
  Public Sub New()
    InitializeComponent()
  End Sub

  Private Sub Inicio_Click(sender As Object, e As RoutedEventArgs)
    If sbRotacionHexagono.GetCurrentState() = ClockState.Stopped Then
      Storyboard.SetTarget(sbRotacionHexagono, Hexagono.RenderTransform)
      sbRotacionHexagono.Begin()
    End If
  End Sub

  Private Sub Pausa_Click(sender As Object, e As RoutedEventArgs)
    sbRotacionHexagono.Pause()
  End Sub

  Private Sub Continuar_Click(sender As Object, e As RoutedEventArgs)
    sbRotacionHexagono.Resume()
  End Sub

  Private Sub Parar_Click(sender As Object, e As RoutedEventArgs)
    If sbPararRotHexagono.GetCurrentState() = ClockState.Stopped Then
      Storyboard.SetTarget(sbPararRotHexagono, Hexagono.RenderTransform)
      sbPararRotHexagono.Begin()
    End If
  End Sub

  Private Sub sbPararRotHexagono_Completed(sender As Object, e As EventArgs)
    sbPararRotHexagono.Stop()
    sbRotacionHexagono.Stop()
  End Sub
End Class
