The Visual State Manager is a very exciting part of the new Parts model that decouples the logic of controls from their UI, leading to the startling realization that every control is lookless and you are free to change the look of every control in the toolbox.
This tutorial examines the three fundamental ways you might modify the appearance of a control:
- In-line style attributes
- The creation of Style objects (in Xaml by hand or using Blend)
- The creation of Control templates
The Parts and State model is examined and I spend a good bit of time examining the ways in which you can significantly modify the appearance and state transition behavior of a control without changing its event handling.
This tutorial, however, is far from the last word (its not even the first word!). I posted an intro to this tutorial just a few days ago, and I’ll be posting a few videos very soon.
On July 23 I’ll be doing a Webcast: Creating Skinnable Custom Controls (and you can, of course, expect videos and blog entries on these topics between now and then)., and then on August 27 we’ll go deeper with a Webcast on
All in all, templates are an exciting and (to be honest, fun) aspect of Silverlight programming, and I’m not sure we’ve done more than scratch the surface of the creative possibilities.