RadioGroup - Phenek/Global.InputForms GitHub Wiki

RadioGroup:

Radio Group is a StackLayout

Property Description
ItemsSource Gets or sets the source of items to template and display.
CheckTemplate Gets or sets the DataTemplate to apply to the ItemsSource. (Icheckable)
DefaultIndex The default checked index at the begining (default 0)
SelectedIndex The selected checked index
SelectedItem The selected checked Item (Key/Value Pair)
IsDeselectable The IsDeselectable property default false

SAMPLE with Items Source:

<!-- Standard RadioGroup with defaultIndex to 0 -->
<global:RadioGroup x:Name="_radioGender"
                        DefaultIndex="0"
                        ItemsSource="{Binding Genders}"
                        Orientation="Horizontal"
                        Spacing="20"
                        HorizontalOptions="Center"
                        CheckTemplate="{StaticResource ButtonRadio}" />

SAMPLE without Items Source:

<!-- RadioGroup with custom CheckButtons-->
<global:RadioGroup Grid.Column="0"
                        Orientation="Horizontal"
                        HorizontalOptions="Center"
                        x:Name="_checkGroup">

    <global:CheckButton Key="0" Value="Male"
                    WidthRequest="70" HeightRequest="30" CornerRadius="15" FontSize="12"
                    BackgroundColor="White"
                    BorderColor="Maroon"
                    TextColor="Maroon"
                    CheckedBackgroundColor="Maroon"
                    CheckedBorderColor="Maroon"
                    CheckedTextColor="White" />

    <global:CheckButton Key="1" Value="Female"
                    WidthRequest="70" HeightRequest="30" CornerRadius="15" FontSize="12"
                    BackgroundColor="White"
                    BorderColor="Teal"
                    TextColor="Teal"
                    CheckedBackgroundColor="Teal"
                    CheckedBorderColor="Teal"
                    CheckedTextColor="White"/>

</global:RadioGroup>
⚠️ **GitHub.com Fallback** ⚠️