Create, modify, or delete a storyboard
In Blend for Visual Studio 2012, storyboards are managed from a Storyboard picker. You create new storyboards by clicking New in the Objects and Timeline panel. When open, storyboards can be modified by using the drop-down menu next to the New button that includes options for creating, renaming, duplicating, reversing, and deleting.
[!メモ]
You might find it easier to work with storyboards by using the Animation workspace because the Objects and Timeline panel is displayed under the artboard instead of next to the artboard. Press Ctrl+F11 to switch between the Animation and the Design workspaces.
To add a new storyboard
In the Objects and Timeline panel, click New .
The Create Storyboard Resource dialog box appears.
In the Name (Key) field, type a name for the storyboard, and then click OK. The new storyboard opens in recording mode.
ヒント By default, any new storyboard created in the root of your document will cause an event trigger to be added in the Triggers panel for the Window.Loaded event. This trigger causes your storyboard to start as soon as your application starts. If you want to create some simple interactivity, you can select the event trigger and then modify it (in the lower half of the Triggers panel) to specify the following:
When object.PreviewMouseDown is raised
In this case, object is the name of an object in your application. (The object must be selected for it to appear in the lower half of the Triggers panel when you modify the trigger.) This causes your animation timeline to begin when you click the object.
To modify a storyboard
Select the timeline from the Storyboard picker by clicking Open a Storyboard in the Objects and Timeline panel and then selecting a storyboard.
To modify the storyboard, you can do any one of the following:
To rename the selected storyboard, double-click the storyboard name or use the pop-up menu in the Objects and Timeline panel.
To animate an object on the artboard, create keyframes or move keyframes to record property changes for the object over time. For more information, see Make a keyframe or Create a simple animation.
To set the selected storyboard to repeat a specified number of times or to play forward and backward, modify the storyboard properties. For more information, see Modify a storyboard to repeat or reverse.
To create a new storyboard that is a duplicate or a reversed duplicate of the selected storyboard, use the pop-up menu in the Objects and Timeline panel. For more information, see Modify a storyboard to repeat or reverse.
To add a motion path timeline to the selected storyboard, use the Convert to Motion Path tool. For more information, see Create, modify, or delete a motion path.
To add a video or sound timeline to the selected storyboard, add the media file to your project and then use the Insert command. For more information, see Insert an audio or video file into the active document.
To configure the storyboard to play when an event occurs or when a property changes, create an event trigger or a property trigger on the object or template that will trigger the storyboard. For more information, see Add or modify a trigger, Animate the points on a path or clipping path, or StoryboardCompletedTrigger.
To programmatically configure the storyboard to play, call the storyboard from your document's code-behind file. For more information, see Create a new event handler method.
To delete a storyboard
In the Objects and Timeline panel, click Open a Storyboard to view the storyboards that are in scope. The Storyboard picker appears.
Select the storyboard that you want to delete from the Storyboard picker.
Blend opens the storyboard and enters timeline recording mode.
Click the drop-down button next to New , and then click Delete.
The storyboard is deleted. Blend exits timeline recording mode, leaving no storyboards open. If any triggers modified the deleted storyboard, they are also updated.