views:

48

answers:

1

Is there a list somewhere of all the common states for each control? We're restyling them and it would be nice to not have to hunt through each control to figure this out.

Basically a list like:

Button: Disabled, Hover, Pressed, Selected, Focus, etc.

ListBox: Disabled, Hover, Focus, etc

I'm looking in Blend and MSDN but not finding anything. Why I asked.

THanks!

+2  A: 

You could use Blend or MSDN documentation. Or, if you feel that way inclined, you could write a script to reflect over the controls and generate a report.

EDIT: annoyingly, the MSDN docs for WPF controls do not include TemplateVisualStateAttributes like they do for Silverlight, so that does not appear to be an option in WPF.

HTH,
Kent

Kent Boogaart
I'm looking in Blend and MSDN but not finding anything. Why I asked.Is there something special I need to do in Blend? When I look at the control templates I'm not getting the States panel, which seems like the obvious place look. Using Blend 3.
dex3703
You need to be editing the template. e.g. drag a Button onto the design surface. Right-click it and then select Edit Template/Edit Copy. Now you'll see the States panel populated with states for the Button.
Kent Boogaart
Kent: thanks for the EDIT, that's helpful. I presume the states are the same between Silverlight and WPF. I don't get the states when I'm editing a Button template, for example. States panel is blank. However I deliberately uninstalled the WPF toolkit due to a conflict so that could be the reason why.
dex3703