Wednesday, September 15, 2010

Silverlight 4 – Using The Visual State Manager And Behaviors

In this tutorial, I am going to use the Visual State Manager and Behaviors to do animations. I will be using Blend 4 to do this tutorial. Blend will make this much easier to do rather than writing the XAML by hand.
The Visual State Manager allows you to create “states” of objects and then move to those states. Moving to those states can be done through code(just one line of code), or by using behaviors.
NOTE: The VisualStateManager was added in Silverlight 2. However, it wasn’t included in WPF until .Net 4. To use the VisualStateManager in WPF in .Net 3.5 SP1, you will need to download the WPF Toolkit from CodePlex.
So first, we will create a new project in Blend. We will just create a Silverlight 4 application without the website. We will name the project VisualStateExample.
Read more:  Eclipsed4utoo's Blog