Automatic VisualState Manager in Silverlight
Posted
by Matt
on Stack Overflow
See other posts from Stack Overflow
or by Matt
Published on 2010-03-22T18:50:30Z
Indexed on
2010/03/22
18:51 UTC
Read the original article
Hit count: 198
If you create a simple button and then choose Edit Template -> Edit a Copy, Blend will automatically generate a style area, along with all the button states (MouseEnter, MouseLeave, Pressed, etc). No where in the code behind or auto generated style area does it say that on a "MouseOver" event, change the state to "MouseOver", but it still manages to work!
Is the only way to change a button's state have to be done the code behind using the VisualStateManager.GoToState method, or can you change it much like CSS does (a:hover) using the VisualStateManager? From my experience, setting just doesn't seem to do the trick.
© Stack Overflow or respective owner