Several customers asked on Twitter today how to navigate to another screen when a storyboard is finished playing.
The answer is: There is a StoryboardCompleted trigger that you can use together with any action, including the Navigate actions. This post describes how to use it.
Remember that most behaviors in Blend follow the “When <trigger> happens, do <action>” pattern, where you can choose trigger and action independently. When you drag a new action onto an element, by default Blend chooses the Event trigger, that fires when a particular even occurs. But Blend also ships with additional triggers, for example a timer trigger, a property change trigger, or the StoryboardCompleted trigger.
Here are the steps to use the StoryboardCompleted trigger:
- Place the action you want on some element of your screen, for example the LayoutRoot element
- The action will show up in the Property Inspector
- Click the “New” button right of TriggerType
- In the upcoming dialog, select the StoryboardCompleted trigger
- Back in the property inspector, select the desired storyboard you want to wait for, and the screen you want to navigate to