O'Reilly logo

Instant Silverlight 5 Animation by Nick Polyak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Storyboards and animations

Storyboards are Silverlight entities that are used for describing the animations of various dependency and attached properties. They consist of one or several animation entities each one of which is dedicated to animating just one dependency property. This section gives an overview of storyboard and animation functionality.

Adding a rotation animation to our code

We are about to make this rectangle rotate by changing the dependency property, that is, RotationAngle using a storyboard.

The storyboard can be created as the page's resource by adding the following XAML code above the <Grid x:Name="LayoutRoot" …> line:

<Storyboard x:Key="RotationStoryboard" Storyboard.TargetName="TheSpinningControl" Storyboard.TargetProperty="(SpinningControlSample:SpinningControl.RotationAngle)"> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required