Page view counter

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.

Published Tuesday, July 08, 2008 3:54 PM by jesseliberty
Filed under:

Comments

# re: Tutorial on Styles & Templates Now Available

Very Cool Tutorial Jesse.  The process is pretty similar in WPF; the main differences appear to be that in WPF you can use a Setter for Template inside of a Style.  Of course you have to do your mouseEnter and MouseLeave animations by hand and not with the VSM.  Do you know if there are any plans to brind VSM to WPF?  I think it is an amazing feature.

I am really looking forward to the tutorial on VSM and Custom Controls.

Thanks for the tutorial; very nice job!

Victor Gaudioso

Tuesday, July 08, 2008 6:55 PM by wpfauthor

# re: Tutorial on Styles & Templates Now Available

Thank you for the .PDFs because you basically have to print stuff like this out and read it over a period of a few days.

Tuesday, July 08, 2008 11:38 PM by adefwebserver

# Dew Drop - July 9, 2008 | Alvin Ashcraft's Morning Dew

Pingback from  Dew Drop - July 9, 2008 | Alvin Ashcraft's Morning Dew

Wednesday, July 09, 2008 11:08 AM by Dew Drop - July 9, 2008 | Alvin Ashcraft's Morning Dew