Working with Animation Events

Storyboard objects expose events that can help you get control over the animations. The first step is assigning a name to the desired storyboard, as in the following example:

<Storyboard Name="ImageStoryBoard">

After you assign a name to the Storyboard, you can handle events summarized in Table 30.1.

Image

TABLE 30.1 Storyboard Events

You handle the Completed event to make an action when an animation completes, as in the following code snippet:

Private Sub ImageStoryBoard_Completed(sender As Object,                                      e As System.EventArgs) ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.