Edit

Share via


RadioButton

RadioButton controls are usually grouped together to offer users a single choice among several options. Only one button at a time can be selected.

The following illustration shows an example of a RadioButton control.

Example of RadioButton controls showing typical radio button states

Styles and templates

You can modify the default ControlTemplate to give the RadioButton control a unique appearance. For more information, see What are styles and templates? and How to create a template for a control.

Content property

The RadioButton uses the ContentControl.Content property to define what is displayed within the control.

Parts

The RadioButton control doesn't define any template parts.

Visual states

The following table lists the visual states for the RadioButton control.

VisualState Name VisualStateGroup Name Description
Checked CheckStates The control is checked (selected). IsChecked is true.
Disabled CommonStates The control is disabled and can't respond to user input.
Focused FocusStates The control has keyboard focus and can receive input.
Indeterminate CheckStates The control is in an indeterminate state. IsThreeState is true, and IsChecked is null.
InvalidFocused ValidationStates The control has a validation error and has keyboard focus. Validation.HasError is true.
InvalidUnfocused ValidationStates The control has a validation error but doesn't have keyboard focus. Validation.HasError is true.
MouseOver CommonStates The mouse pointer is positioned over the control.
Normal CommonStates The control is in its default, normal state.
Pressed CommonStates The control is pressed by user interaction.
Unchecked CheckStates The control is unchecked (not selected). IsChecked is false.
Unfocused FocusStates The control doesn't have keyboard focus.
Valid ValidationStates The control is valid and has no validation errors. Validation.HasError is false.

See also

ToggleButton