Skip to content
On this page

RadioButton

Radio buttons let people select one option from a set of options.

  • Use radio buttons (not switches) when only one item can be selected from a list.
  • Label should be scannable.
  • Selected items are more prominent than unselected items.

Examples

xml
<VerticalStackLayout Padding="20" Spacing="20">
    <md:RadioButton Orientation="Horizontal">
        <md:RadioItem Text="item 1" />
        <md:RadioItem Text="item 2" />
        <md:RadioItem Text="item 3" />
    </md:RadioButton>
    <md:RadioButton Orientation="Vertical">
        <md:RadioItem Text="item 1" />
        <md:RadioItem Text="item 2" />
        <md:RadioItem Text="item 3" />
    </md:RadioButton>
</VerticalStackLayout>

Properties

nametypedefault
ItemsObservableCollection<RadioItem>
SelectedIndexint-1
SelectItemRadioItem
OrientationStackOrientationHorizontal
Spacingdouble0
HorizontalSpacingdouble0
VerticalSpacingdouble0
CommandICommand
CommandParameterobject

Events

nametype
SelectedIndexChangedEventHandler<SelectedItemChangedEventArgs>

RadioItem Properties

nametypedefault
ActivedColorColorstyle
IsSelectedboolfalse
Textstringempty
FontColorColorOnSurfaceVariantColor
FontSizefloat16
FontFamilystring
FontWeightFontWeightMedium
FontIsItalicboolfalse
StateLayerColorColorPrimaryColor

RadioItem Events

nametype
ClickedEventHandler<TouchEventArgs>
PressedEventHandler<TouchEventArgs>
ReleasedEventHandler<TouchEventArgs>
LongPressedEventHandler<TouchEventArgs>
RightClicked ( desktop only )EventHandler<TouchEventArgs>