Xamarin RadioButtons with two groups doesn't initialize correctly

Reg 21 Reputation points
2021-05-15T19:52:36.497+00:00

Can anybody tell me why only ONE of these groups is initialized correctly (instead of BOTH of them)? Project is UWP and Xamarin Forms is Version 5.0.0.2012 btw

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:d="http://xamarin.com/schemas/2014/forms/design"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             x:Class="RadioButtonInput.MainPage">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="100" />
        </Grid.RowDefinitions>

        <StackLayout RadioButtonGroup.GroupName="People"
                 Grid.Row="0">
            <RadioButton 
                GroupName="Person"
                Content="Bob"/>
            <RadioButton
                GroupName="Person"
                Content="Ray"
                IsChecked="True"/>
        </StackLayout>

        <StackLayout RadioButtonGroup.GroupName="Colours" 
                     Grid.Row="1">
            <RadioButton
                GroupName="Colour"
                Content="Red"
                IsChecked="True"/>
            <RadioButton 
                GroupName="Colour"
                Content="Yellow"/>
        </StackLayout>
    </Grid>

</ContentPage>
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,363 questions
0 comments No comments
{count} votes

Accepted answer
  1. JessieZhang-MSFT 7,711 Reputation points Microsoft Vendor
    2021-05-17T07:54:24.8+00:00

    Hello,

    Welcome to our Microsoft Q&A platform!

    Yes ,it is just the case as you said.
    And I have create a new issue in Xamarin github, you can follow it up here:https://github.com/xamarin/Xamarin.Forms/issues/14271 .

    Thanks for your feedback for xamarin forms.

    Best Regards,

    Jessie Zhang

    ---
    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.