githubEdit

RadioButton

This page describes how to create radio buttons in MauiReactor

The .NET Multi-platform App UI (.NET MAUI) RadioButtonarrow-up-right is a type of button that allows users to select one option from a set. Each option is represented by one radio button, and you can only select one radio button in a group.

Official documentation: https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/radiobuttonarrow-up-right MauiReactor sample app: https://github.com/adospace/mauireactor-samples/tree/main/Controls/RadioButtonTestApparrow-up-right

Group of radio buttons with string content

new VStack(spacing: 5)
{
    new RadioButton("Radio 1"),
    new RadioButton("Radio 2"),
    new RadioButton("Radio 3"),
    new RadioButton("Radio 4")
        .IsChecked(true)
},
Simple radio button group

Group of radio buttons with custom content

Radio buttons with custom content (iOS)
circle-exclamation

This is a sample control template for Android:

Using the above style:

Radio buttons with custom style

Bonus tip: Radio buttons for an Enum

Say you have an Enum like this:

This code enumerates its values and displays them in a button group:

Radio buttons for an enum type

Last updated