How can I create a set of ToggleButtons that behave like RadioButtons? How can I create a set of ToggleButtons that behave like RadioButtons? wpf wpf

How can I create a set of ToggleButtons that behave like RadioButtons?


If you want radio buttons that look like toggle buttons won't radio buttons styled to look like toggle buttons solve your problem?

<StackPanel>    <RadioButton GroupName="groupFoo" Style="{StaticResource {x:Type ToggleButton}}">Button 1</RadioButton>    <RadioButton GroupName="groupFoo" Style="{StaticResource {x:Type ToggleButton}}">Button 2</RadioButton></StackPanel>