3

I'm using VSM (Visual State Manager, from the WPF Toolkit) in WPF and I'm trying to find a list of States.

Basically, I understand that there are certain "magic" states - like the MouseOver state is automatically applied when the control is moused over, or the Focused state that is applied when ... focused.

Is there a list of these somewhere? I'm sure there is, I just can't find it.

Andrew Dunkman
  • 1,131
  • 2
  • 8
  • 18

3 Answers3

5

Here is another resource on this.

In it, Jeetu lists out the state groups and the states in each group ... for each of the basic controls. I'll list them out here too for convenience.

Button, GridViewColumnHeader, RepeatButton:
    CommonStates: Normal, MouseOver, Pressed, Disabled
    FocusStates: Unfocused, Focused

CheckBox, RadioButton:
    CommonStates: Normal, MouseOver, Pressed, Disabled
    CheckStates: Unchecked, Checked, Indeterminate
    FocusStates: Unfocused, Focused

ListBoxItem:
    CommonStates: Normal, MouseOver
    SelectionStates: Unselected, Selected
    FocusStates: Unfocused, Focused

ProgressBar:
    CommonStates: Determinate, Indeterminate
    FocusStates: Unfocused, Focused

TextBox, RichTextBox:
    CommonStates: Normal, MouseOver, Disabled, ReadOnly
    FocusStates: Unfocused, Focused
cplotts
  • 13,941
  • 9
  • 55
  • 66
4

Have a look at Karen Corby's last post on Parts & States Model with VisualStateManager (see point 4). She lists two 'special' state groups that are implemented on the base controls for Silverlight:

Silverlight CommonStates (Normal, MouseOver, Pressed, Disabled) and FocusStates(Unfocused, Focused)
(source: scorbs.com)

I believe that WPF kept this organization and naming convention for compatibility with Silverlight, where VSM was first implemented.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Nicholas Armstrong
  • 5,814
  • 2
  • 28
  • 18
0

For those looking at WPF on .NET 4.0 you can get an exhaustive list here:

http://msdn.microsoft.com/en-us/library/aa970773.aspx

micahtan
  • 18,530
  • 1
  • 38
  • 33
  • I just checked and it appeared to work? You'll have to open the link for the control that you want to learn more about. – micahtan May 08 '17 at 14:17