There is a Timeline.Completed
Event that you can use. You can either set it in XAML, or in C# on a Storyboard
instance. The linked page has a full working example that you can view.
The handler used is the default EventHandler delegate
:
private void StoryboardCompleted(object sender, EventArgs e)
{
// the Storyboard has stopped
}
UPDATE >>>
Although the Completed
event can be set on a Storyboard
instance, it is in fact defined in the Timeline
class. As Timeline
is the base class for all AnimationTimeline
classes, this means that you can also attach a handler to the Completed
event from the AnimationTimeline
object that you are passing into the BeginAnimation
event.