Unable to set Background property of MenuItem for IsPressed event

后端 未结 1 1832
死守一世寂寞
死守一世寂寞 2021-01-15 04:10

I want to change the background of a MenuItem when the MenuItem is pressed.


EDIT:

Based on your updates take a look at how a default MenuItem is constructed via XAML. This should get you where you need to go in providing styling for the varying parts of the MenuItem. Note the use of the Role property within the MenuItem style dealing with the headers and items at both the top level and sub level.

0 讨论(0)
提交回复
热议问题