How do I programmatically get the current Visual State of a WPF FrameworkElement?

前端 未结 3 822
一整个雨季
一整个雨季 2021-02-19 10:47

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:

3条回答
  •  清歌不尽
    2021-02-19 11:26

    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.

提交回复
热议问题