views:

43

answers:

1

How do I create a clicked state in visual state manager for a control that is based on a button control? I tried using a pressed state but once the mouse button is released it reverts back to the original color. I would like to change the color of the button when it is clicked on. I am not looking for a solution in the click event handler because this is a part of a template. Thank you

+2  A: 

You need to derive from ToggleButton instead and use the Checked state. ToggleButton has a persistent Checked state whereas Button is only in the Pressed state while it is being clicked.

Josh Einstein