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

前端 未结 2 1907
梦如初夏
梦如初夏 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条回答
  •  长情又很酷
    2020-12-21 10:19

    You can do this. This will Bind to the child MenuItem's DataContext, which is "ItemA" for the first item.

     
        
    
    

提交回复
热议问题