electric beach

Christian Schormann

Tuesday, June 3, 2008

Visual State Manager: Goals

Our goal for Silverlight 2 was to provide a control skinning model that is imminently usable for visual designers, providing an easy entry ramp, yet with sufficient power for sophisticated application skins. Our design goals did include:

  1. Make sure that skin design can be a task for a visual designer. Avoid requiring skills visual designers are not likely to have. Reduce the learning curve for common skinning tasks
  2. Create a model that can work with both Silverlight and desktop WPF 
  3. Create a model that can be tooled easily and effectively
  4. Allow for skinning of composite controls, i.e. control skins that contain other controls as parts (for example the up/down buttons in a slider)  
  5. Make it possible to create interchangeable skins
  6. Skinned controls should be portable to desktop WPF with reasonably little effort

We addressed these design goals as follows:

  • The Silverlight model uses styles and control templates just like WPF.
  • We added a clean and simple conceptual model that separates the visual aspects of a control skin from the behavioral aspects of the control. Visual states completely encapsulate the concept of the different looks a control can have, in a way that enables visual designers to simply focus on how the control needs to look in different states. 
  • We added a well-defined, differentiated transition model. With VSM, transitions between visual states can be explicitly defined, either in a very simple general way, or as specific and detailed as required. Most importantly, the transition model, while it permits the definition of detailed manual transitions, also allows designers to simply specify transition timing, generating all other details automatically. This approach is fast, easy and flexible.
  • The control code provides default hookup of events and properties to state changes. In the future, it will be possible to extend and override the default hookup provided by the control, but this ability is not available yet. The ability to extend and override visual states could be implemented on top of the existing system, so this is by no means a systemic issue with the model – we simply did not have the time to provide this capability in this round.
  • Tooling. The June preview of Expression Blend provides explicit tooling for the VSM model. Controls provide a list of desired visual states to Blend, and Designers can simply pick a visual state from a list and then tweak visuals and transitions using the Blend artboard. No deep understanding of control events and properties is required.
  • State groups allow complex controls to reduce the number of individual states that need to be exposed for editing
  • As an added bonus, visual states are also available for user controls, not just for fully template-based controls. User controls are a great choice when interchangeable skins are not required. Making user controls with dynamic visuals that respond to control state is much easier with VSM and the consistency with styling of template-based controls significantly reduces learning effort and production cost.  
posted by cs at 07:41  

9 Comments »

  1. Hi Christian,
    I’m trying to find a less verbose way to create an image button in which I swap out 4 different png images for the 4 common button states:Normal, MouseOver, Pressed, Disabled. Here’s what I’ve done. Is there a better way?

    It would seem that I could use one image and just swap out the source, but that doesn’t seem to work.

    Thanks,
    Bruce

    Comment by BruceDenham — June 4, 2008 @ 11:55

  2. I’m glad you have recognized the need for state management. I have done this over and over again in some form, in Flash, in WPF and in Silverlight.
    I’m curious how you deal with “hijacked” transitions (state change while in transition) and with transitions triggered by events. E.g. I found you often need something like a “join” concept for events.
    Is this limited to controls or will you be able to use this at a higher level (“page” states) as well?

    Comment by fkruesch — June 4, 2008 @ 23:27

  3. [...] Creating Control Skins with Visual State Manager – An Introduction (Make sure you see the video!) – Visual State Manager: Goals – Visual State Manager for User Controls: A Simple Chord Finder [...]

    Pingback by Visual State Manager, new feature of Expression Blend « Kok Chiann’s Blog — June 5, 2008 @ 01:16

  4. [...] 2 Beta was released earlier today and one of the big changes is the switch to using Visual State Manager for control design/development. Another is that many of the core controls (Button, ListBox, etc.) [...]

    Pingback by Continuing access to Silverlight 2’s generic.xaml resources [SilverlightDefaultStyleBrowser updated for Silverlight 2 Beta 2!] | Silverlight — June 7, 2008 @ 00:24

  5. [...] e qui Posted: Monday, June 09, 2008 11:45 AM by pietrobr Filed under: [...]

    Pingback by Pietro Brambati Blog : Silverlight 2 beta 2 – Controlli e Visual State Manager — June 9, 2008 @ 02:46

  6. [...] Visual State Manager: Goals [...]

    Pingback by Pietro Brambati Blog : Silverlight 2 - risorse — July 1, 2008 @ 01:32

  7. [...] Visual State Manager: Goals [...]

    Pingback by Pietro Brambati Blog : Silverlight 2 – (alcune) risorse — July 3, 2008 @ 23:12

  8. [...] of these controls will use the new Visual State Manager templating model and be fully customizable in XAML by hand or through Expression Blend.  They [...]

    Pingback by Shawn Burke's Blog : Control Freak. — September 16, 2008 @ 20:41

  9. [...] of these controls will use the new Visual State Manager templating model and be fully customizable in XAML by hand or through Expression Blend.  They [...]

    Pingback by Control Freak. - Readed By Wrocław NUG members - Wroc.NET — September 16, 2008 @ 23:29

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress

cialis rezeptfrei cialis receta cialis prezzo viagra preis propecia generique levitra donna prix de cialis trouble erection viagra bestellen acheter cialis levitra senza ricetta commande viagra vente kamagra acheter clomid en france cialis bon prix viagra 100 mg acquisto viagra originale viagra donne viagra en ligne sildenafil bestellen cialis venta levitra donne levitra france acheter cialis pharmacie venta viagra viagra acquisto online achat cialis en ligne levitra receta pildoras cialis viagra rezeptfrei viagra recensioni generische viagra viagra te koop trouver du cialis medicament viagra viagra venta libre cialis belgique cialis vente en ligne commande levitra vente de cialis sur internet viagra svizzera viagra preço cialis suisse acheter viagra cialis generico 10 mg trouver du levitra kamagra apcalis curare impotenza procurer du viagra viagra farmacia cialis ricetta medica sildenafil moins cher zyban prix achat de levitra acheter finasteride achete cialis acheter cialis en belgique vardenafil bestellen cialis sur internet acquisto viagra senza ricetta pharmacie en ligne ordina levitra cialis generico comprar cialis em portugal acquisto viagra italia viagra cialis differenze cialis moins cher acheter cialis en pharmacie vendo viagra cialis prix kamagra rezeptfrei achat vardenafil vente viagra viagra vendita on line kamagra kopen comprar cialis generico levitra generico levitra sur le net acheter cialis generique cialis kauf compro cialis compro viagra cialis france levitra 20 mg costo levitra achat cialis generique cialis livraison rapide compro cialis acheter du kamagra viagra sin receta viagra vendita italia tadalafil moins cher cialis prijs viagra 100 mg acquisto viagra net levitra sans ordonnance acheter zithromax acheter cialis internet cialis kopen levitra rezeptfrei levitra farmacia citrate de sildenafil pastilla sildenafil commander du cialis acheter cialis generic viagra naturel generische levitra viagra kosten viagra donna acquistare levitra pastilla levitra impotenza cure cura impotenza levitra venta libre kamagra pharmacie acheter du viagra viagra suisse accutane generique receta viagra levitra pharmacie achat levitra acquista levitra viagra prix viagra europe acheter kamagra oral jelly viagra italia cialis vente libre comprar cialis acheter prozac comprar levitra procurer du levitra kamagra gel venta de sildenafil