O'Reilly logo

Windows Application Development Cookbook by Marcin Jamro

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

Animating the color of an element

Apart from the already described animations, it is also possible to animate the values of various properties of controls. In this recipe, you will learn how to animate colors.

As an example, you will create a simple page with basic shapes that will form a visualization of three lights--red, yellow, and green--arranged horizontally one next to another. After you click on the drawing, the animation should start and these lights should be switched on (one per second): red, yellow, and green. Of course, the color should be changed from black with the help of animation.

Getting ready

To step through this recipe, you need only the automatically generated project.

How to do it...

To prepare the example that animates the color ...

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