How do I programmatically get the current Visual State of a WPF FrameworkElement? And by state I mean the states like "Normal", "MouseOver", "Disabled", etc.
EDIT:
Basically, I am changing the Visual state of a button with VisualStateManager.GoToState(e, "MouseOver", true);
, and I want to know what state to change it back to after I am done.
I think you have to know/remember the button state by yourself. VSM just displays the state in which the button is by GoToState
method.
Edit: I've just found an article how to create a custom VSM that remembers control states.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With