WPF Reflections

Jun 12 2008   2:51PM GMT

WPF Animations – key properties

Mark Shurmer Profile: MarkWPF

In a previous blog, I spoke about the different sets of animation classes.

Also when you are doing animations in WPF, there are some key properties.
These are properties that apply to most animations.

From – this property gives you the starting value for your animation.
It is optional, and if you leave it out a starting value is calculated from existing value taking into account the animation

To – this property gives you the ending value for your animation.
It is also optional. When you leave it out, an ending value is calculated , but without taking into account the animation. That means it uses the value set in the xaml or code.

By – this property allows you to specify a once only increment for your animation.
You can combine this with a To property, or leave it without a To

Duration – this allows you to specify the length of time that the animation runs for
You can specify the Duration type, or a TimeSpan (which has an implicit cast to a Duration).
The advantage of the Duration class is that it can allow you to specify a duration of automatic or forever.

IsAdditive – this makes the From, To and By work by adding their values to the starting value for the property.

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: