开发者

How can I create a group of radio menu items in WPF?

WPF seems to be lacking a RadioMenuItem class or similar functionality. In Windows.Forms, menu items had a RadioChecked property, but WPF menu items only have IsChecked. I can put actual RadioButtons in a MenuItem, but this feels weird and looks awkward.

How can I create a group of menu items that function like radio buttons in a WPF menu? For reference, see the "Zoom" menu in I开发者_如何转开发E8.


Change the Template of the MenuItem to display a RadioButton instead of the standard display


I found this and StatckOverflow post another post with Google and neither had an answer that worked for me.

You don't want to use the Template you want to use the ItemContainerStyle.

I put the answer on the other stack overflow post: https://stackoverflow.com/a/11497189/375727

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜