RadioButton

Mutually exclusive option with (*) / ( ) indicator and GroupName.

Overview

RadioButton extends ButtonBase and provides a mutually exclusive selection option. It renders as (*) Content when checked or ( ) Content when unchecked. RadioButtons sharing the same GroupName under the same parent are mutually exclusive — checking one automatically unchecks the others in the group. Unlike CheckBox, a RadioButton cannot be toggled off by clicking it again.

Basic Example

<StackPanel Orientation="Vertical">
  <RadioButton Content="Small" GroupName="Size" IsChecked="True" />
  <RadioButton Content="Medium" GroupName="Size" />
  <RadioButton Content="Large" GroupName="Size" />
</StackPanel>

Properties

PropertyTypeDefaultDescription
IsCheckedboolfalseWhether this radio button is currently selected.
GroupNamestring""Name of the mutual exclusion group. All RadioButtons with the same GroupName under the same parent are exclusive.
FocusColorColorCyanIndicator color when the control has focus.
HoverColorColorYellowIndicator color when the mouse hovers over the control.
ContentobjectnullThe label displayed next to the radio indicator. Inherited from ContentControl.
CommandICommandnullCommand executed when the radio button is checked. Inherited from ButtonBase.
CommandParameterobjectnullParameter passed to the Command. Inherited from ButtonBase.

Examples

Basic Group

<StackPanel Orientation="Vertical">
  <TextBlock Text="Select a color:" />
  <RadioButton Content="Red" GroupName="Color" />
  <RadioButton Content="Green" GroupName="Color" IsChecked="True" />
  <RadioButton Content="Blue" GroupName="Color" />
</StackPanel>

Multiple GroupNames

<StackPanel Orientation="Vertical">
  <TextBlock Text="Theme:" />
  <RadioButton Content="Dark" GroupName="Theme" IsChecked="True" />
  <RadioButton Content="Light" GroupName="Theme" />

  <TextBlock Text="Font:" />
  <RadioButton Content="Monospace" GroupName="Font" IsChecked="True" />
  <RadioButton Content="Sans-serif" GroupName="Font" />
  <RadioButton Content="Serif" GroupName="Font" />
</StackPanel>

Data-Bound RadioButton

<StackPanel Orientation="Vertical">
  <RadioButton Content="Option A"
               GroupName="Options"
               IsChecked="{Binding IsOptionASelected}" />
  <RadioButton Content="Option B"
               GroupName="Options"
               IsChecked="{Binding IsOptionBSelected}" />
</StackPanel>

Keyboard Shortcuts

KeyAction
EnterCheck this radio button (unchecks others in the same group).
SpaceCheck this radio button (unchecks others in the same group).
TabMove focus to the next focusable control.
Shift+TabMove focus to the previous focusable control.

Key Concepts