How to set a MenuItem's IsChecked property for a child of type Enum via XAML?

前端 未结 2 1903
梦如初夏
梦如初夏 2020-12-21 09:45

I\'ve bound a MenuItem to a Enum using this solution.

The Enum Values are displayed correctly, yet I cannot seem to set a default checked value for the MenuItem\'s

2条回答
  •  Happy的楠姐
    2020-12-21 10:23

    in your solution consider changing

    
    

    to

    
    

    in your example you check that header is equal to sting "enums:AnEnum.ItemA" not to enum AnEnum member ItemA.

提交回复
热议问题