Freigeben über


VisualStateManager

Recently, I talked about how templates in WPF/SL are fundamentally built around the concept of a state machine, where the condition is a Trigger (desktop WPF) or code (Silverlight) and the new state is a group of Setters (desktop WPF) or a Storyboard (Silverlight).  I hinted that in the future we would be making this more formal, and with the announcement of VisualStateManager for Silverlight Beta 2, you can see what I was talking about.

 Christian's introduction thoroughly covers the functionality and tooling, so let me expand on where this is going architecturally:

 VisualStateManager, by providing an abstraction of a VisualState, makes unifying the deskop and web models much more straightforward.  While currently in Silverlight a VisualState contains a Storyboard, in the future it contain a group of Setters, just as in WPF.  And while currently the user must call VisualStateManager.GoToState in code, in the future a GoToState action in the body of a Trigger will allow WPF style "codeless" templates to utiltize VisualStates and get the benefits of automatic transition generation and a more designer-friendly tooling experience.  More soon...

Comments

  • Anonymous
    June 10, 2008
    I'm glad SL2 templating model is coming more inline with WPF.  Do you think you'll hit full Trigger support (condition + setters) by SL2 RTM or at some point beyond that?

  • Anonymous
    June 10, 2008
    PingBack from http://dogs-pets.info/dog-breeding/?p=993

  • Anonymous
    September 18, 2008
    The comment has been removed

  • Anonymous
    April 27, 2009
    The last one-and-a-half to two years I have been developing WPF applications. A few weeks ago I decided