RadioButton

Basic example

View.StackLayout([
    View.RadioButton(Content.String "RadioButton 1")
    View.RadioButton(Content.String "RadioButton 2")
])

Basic example with styling

View.StackLayout(
    horizontalOptions = style.Position,
    verticalOptions = style.Position,
    backgroundColor = style.LayoutColor,
    children = [
        View.RadioButton(
            horizontalOptions = style.Position,
            verticalOptions = style.Position,
            backgroundColor = style.ViewColor,
            padding = style.Padding,
            isChecked = true,
            content = Content.String "RadioButton 1"
        )
        View.RadioButton(
            horizontalOptions = style.Position,
            verticalOptions = style.Position,
            backgroundColor = style.ViewColor,
            padding = style.Padding,
            isChecked = false,
            content = Content.String "RadioButton 2"
        )
    ]
)

See also:

More examples

View.StackLayout([
    // These RadioButtons will be grouped together, beacause they are in the same StackLayout
    View.RadioButton(
        padding = Thickness 2.0,
        content = Content.String("content1"),
        isChecked = true
        checkedChanged = (fun on -> dispatch (...))
    )
    View.RadioButton(
        padding = Thickness 2.0,
        content = Content.String("content2"),
        isChecked = false
        checkedChanged = (fun on -> dispatch (...))
    )
])