#855 – RadioButtons Are Grouped Based on their Container
July 3, 2013 1 Comment
The RadioButton control acts as an exclusive selection, allowing you to pick one item at a time from a group of choices. Only one RadioButton within the group can be selected at any given time and selecting one of the RadioButtons clears whichever button was previously selected.
You can have more than one group of RadioButtons within your application. By default, the container that the RadioButtons belong to dictate the grouping, such that only one RadioButton within the parent container can be selected at a time. This means that you can create a second group of RadioButtons by placing them in a second container.
<StackPanel Margin="10"> <RadioButton Content="Male"/> <RadioButton Content="Female"/> </StackPanel> <StackPanel Margin="10"> <RadioButton Content="Tall"/> <RadioButton Content="Short"/> </StackPanel>