WPF Reflections

Jun 28 2008   7:08AM GMT

WPF Animation – key frame

Mark Shurmer Profile: MarkWPF

Firstly, what does a key frame animation mean?

It is a way of specifying steps for your animation to follow.
The WPF runtime will work out the smooth transition between the steps for you.

Why would you want to do such a thing?
If you want to control how the animation flows, but don’t want to specify every point, then a key frame helps you.

In the following example,  I have used a key frame animation to specify the periods at which the button’s rectangle changes colour.
It changes colour from AliceBlue to Blue to DarkGrey when you click on the button

june28_1.JPG

Notice how you need to specify the target property as Fill.Color, if you don’t WPF tries complains that you are specifying a Color object when it is expecting a Brush!

 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: