Chapter 21. Using Transforms and Animations
In this lesson you will learn about animations and how to use them. You'll learn how to animate transforms, and how to apply easing to your animations. You will also learn how to use Key Frames to animate using more than two target values.
ANIMATIONS
Animation is the process of cycling through a series of drawings or images quickly enough that it appears the objects in those drawings or images are moving. In Silverlight you can apply animations to different properties of an object, making that object appear to change or move.
Using Silverlight you can perform animations on a property whose value is of the type Double, Color
, or Point
. If the animation will require only two sets of values (a beginning and an ending value), the animation can be applied using one of the following:
DoubleAnimation
ColorAnimation
PointAnimation
If, however, you want to apply sets of values, you will need to use key frame animation. This enables you, for instance, to change the color of a shape from white to red, then from red to yellow, then from yellow to green.
Adding an Animation
There are three parts to the process of creating and applying an animation:
Create the storyboard.
Create the animation.
Start the animation using an event.
Creating the Storyboard
The storyboard is the container that holds your animations. It can hold one or more. To make the storyboard available to all controls on the page, place the following code inside the opening and closing Grid
tags for ...
Get Windows® Phone 7 Application Development 24-Hour Trainer 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.