Page 1 of 1

Group names on radio buttons

Posted: 09 Jun 2014, 20:57
by walhore
Hi, I was wondering if there are any plans to support Group names on radio buttons? Thanks!

Re: Group names on radio buttons

Posted: 09 Jun 2014, 22:59
by sfernandez
They are already supported.

If you take a look at the RadioButton sample in the ControlGallery demo, you will see some radio buttons grouped by name. This is the code of the sample:
<Grid>
	<StackPanel>
		<TextBlock Text="Group is defined by GroupName, not panels:" Margin="0,0,8,0"/>
		<RadioButton Content="A: RadioButton 1" Margin="0,6,0,0" IsChecked="True" GroupName="A"/>
		<RadioButton Content="A: RadioButton 2" Margin="0,2,0,0" GroupName="A"/>
		<RadioButton Content="B: RadioButton 1" Margin="0,6,0,0" IsChecked="True" GroupName="B"/>
		<RadioButton Content="B: RadioButton 2" Margin="0,2,0,0" GroupName="B"/>
    </StackPanel>
    <Border BorderBrush="Gray" BorderThickness="1" CornerRadius="4" Padding="5" Margin="0,25,0,0" HorizontalAlignment="Right" VerticalAlignment="Top">
        <RadioButton Content="A: RadioButton 3" GroupName="A"/>
    </Border>
	<Border BorderBrush="Gray" BorderThickness="1" CornerRadius="4" Padding="5" Margin="0,0,0,0" HorizontalAlignment="Right" VerticalAlignment="Bottom">
        <RadioButton Content="B: RadioButton 3" GroupName="B"/>
    </Border>
</Grid>

Re: Group names on radio buttons

Posted: 09 Jun 2014, 23:02
by jsantos
The property is also listed in the Radio Button documentation.

Re: Group names on radio buttons

Posted: 10 Jun 2014, 16:02
by walhore
Ah, thanks, I'll give it a try.