Tutorial on Styles & Templates Now Available

I’m very pleased to announce that my latest tutorial, on Styles, Templates and the Visual State Manager is now available, in HTML, or as a PDF, and the complete source code is available as well.

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:

  1. In-line style attributes
  2. The creation of Style objects (in Xaml by hand or using Blend)
  3. 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.

TemplatedButton

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: Visual State Manager: Transitions and Animation, and then on August 27 we’ll go deeper with a Webcast on Creating Skinnable Custom Controls (and you can, of course, expect videos and blog entries on these topics between now and then).

 

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.

About Jesse Liberty

Jesse Liberty has three decades of experience writing and delivering software projects and is the author of 2 dozen books and a couple dozen online courses. His latest book, Building APIs with .NET will be released early in 2025. Liberty is a Senior SW Engineer for CNH and he was a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS. He is a Microsoft MVP.
This entry was posted in z Silverlight Archives and tagged . Bookmark the permalink.