Hi all,
I am very new to VB so I was wondering if you could get me an easy reply on that.
I want to start a second Storyboard animation after the first one is completed but I do not know how to define the event trigger, this is my code, Thanks a lot:
Dim mystoryboard As New Animation.Storyboard
Dim animationX As New Animation.DoubleAnimation
Dim animationY As New Animation.DoubleAnimation
Dim moveTransform As New TranslateTransform
Dim duration As Duration
Dim rectangle as new shapes.rectangle
moveTransform.X = 0
moveTransform.Y = 0
rectangle.RenderTransform = moveTransform
duration = New Duration(TimeSpan.FromSeconds(5))
animationX.Duration = duration
animationY.Duration = duration
mystoryboard.Duration = duration
animationX.From = 0
animationX.To = 200
animationY.From = 0
animationY.To = 200
mystoryboard.Children.Add(animationX)
mystoryboard.Children.Add(animationY)
Animation.Storyboard.SetTarget(animationX, moveTransform)
Animation.Storyboard.SetTarget(animationY, moveTransform)
Animation.Storyboard.SetTargetProperty(animationX, "X")
Animation.Storyboard.SetTargetProperty(animationY, "Y")
GridMain.Resources.Add("mystoryboard", mystoryboard)
mystoryboard.Begin()