Adding and Modifying a Behavior to Play an Animation upon Page Load.
Even those these behaviors you added were accessed through a context menu, they could also have been added another way: through the Behaviors category in the Asset library. You’ll take a look at this now.
Double-click the Boots screen in the SketchFlow Map panel to select it.
Click on the checkout button and then locate in the Objects and Timeline panel.
Click on the arrow to the left of the object to expand it. There is an icon of a gear with the label [NavigateToScreenAction]. This is the behavior you added in the last exercise.
The behavior is added in the Objects and Timeline panel.
Now you’ll add another behavior in order to play animation on this page which shows a simulation of a user dragging a product into a shopping cart. In the Objects and Timeline panel, click on the LayoutRoot object. You can think of this as the main container in the screen that holds all your other objects. You can set a behavior to play an animation when a user opens this screen.
Right-click the Layout Root and, from the contextual menu, choose Play SketchFlow Animation > Boots/SketchFlowAnimation.
You see the behavior added immediately below LayoutRoot. It is labeled [PlaySketchFlowAnimationAction].
Click on the behavior [PlaySketchFlowAnimationAction] to select it. You will now modify its properties.
In the Properties panel there are two sections exposed: Trigger and Common Properties.
The Trigger and Common Properties panes.
Locate the EventName property in the Trigger section, click on the drop-down menu and choose Loaded.
Change the EventName property.
Press F5 and navigate to the Boots screen, as soon as the screen appears, the animation plays.
Working with Custom Behaviors for use with Expression Blend
SketchFlow comes with a few basic behaviors installed, however there is also the ability to import custom behaviors tailored for your projects. Since a behavior is merely a packaged piece of code, they can be added to your projects as needed. For the most part, writing behaviors is best left to developers or programmers who are familiar with C sharp code.