Create a simple animation
You can animate any visual element in Blend for Visual Studio 2012.
To create a simple animation
In Blend, open or create a new project.
For more information, see Create a new project.
Press F6 to switch to the Animation workspace. (F6 will switch between the available workspaces. In the Animation workspace, the Objects and Timeline panel is under the artboard.) Create any objects that you plan to animate.
팁 Object refers to an item on the artboard in Blend. For example, when you select Rectangle from the Tools panel and draw a rectangle on the artboard, you create a rectangle object. For more information about objects and controls, see Working with objects and properties and Choosing and using interactive controls.
In the Objects and Timeline panel, click New .
The Create Storyboard Resource dialog box appears.
In the Resource name (Key) field, type a name for the timeline, and then click OK. Blend enters timeline-recording mode with the playhead at the 0-second mark. When in recording mode, any property that you set will automatically record a keyframe on the timeline.
팁 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 begin 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 example, 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.
In the Objects and Timeline panel, select the object that you want to animate.
If you want the selected object to start at its current position and appearance, click Record Keyframe to record the object at the 0-second mark. A keyframe appears on the timeline in the row that corresponds to the selected object.
In the Objects and Timeline panel, drag the playhead to the point in time where the animation should finish.
If you want your object to look the same at the end of the animation as it does at the start of the animation, click the Record Keyframe button.
Move the playhead to a location in the timeline where you want a property change to occur.
Change a property of the selected object, such as the position, color, or size of the object. A keyframe automatically appears on the timeline to record the property change.
팁 You can view the individual property keyframes by expanding the node for your object. This is useful if you want to move a keyframe for an individual property instead of for the whole object.
To see the animation that you just created, click the Play button at the top of Objects and Timeline.
팁 To exit timeline recording mode, click Close Storyboard to return to the initial state of all objects in the current scope.