Matthew
Matthew

Reputation: 29256

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 IE8.

Upvotes: 6

Views: 6921

Answers (2)

Rhyous
Rhyous

Reputation: 6690

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

Upvotes: 1

Rachel
Rachel

Reputation: 132618

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

Upvotes: 2

Related Questions