(X) Hide this Join our next live webcast on December 15th, 10 am PDT - Building a Silverlight 4 application end-to-end. Presenter: Gill Cleeren
Check the webinar agenda | Register for the webinar
Skip Navigation LinksHome / News / View News

Using Visual States in custom controls in Silverlight

+ Add to SilverlightShow Favorites
0 comments   /   posted by Silverlight Show on Nov 26, 2010
(0 votes)

SilverlightShow Page for all Silverlight and Windows Phone 7 (WP7) things on TwitterIn order to demonstrate how Visual States can be used to change the look of your controls, Timmy Kokke has created a cool traffic light control.

Source: Timmy Kokke's Blog

Visual States are an easy way to change the looks of your controls based on certain states. This state can be something like a mouse hover, some invalid state or any state you need in a control.

For this tutorial I chose a traffic light control that can be one of four states. Green, Orange, Red and Inconclusive (blinking orange). In the end I show you how to use behaviors on buttons to set the state of the traffic light. This makes the use of visual states perfectly suitable for use in MVVM projects. 

                                            

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 2 and 1 and type the answer here: