walhore
Topic Author
Posts: 19
Joined: 25 Feb 2013, 17:24

Group names on radio buttons

09 Jun 2014, 20:57

Hi, I was wondering if there are any plans to support Group names on radio buttons? Thanks!
 
User avatar
sfernandez
Site Admin
Posts: 2908
Joined: 22 Dec 2011, 19:20

Re: Group names on radio buttons

09 Jun 2014, 22:59

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>
 
User avatar
jsantos
Site Admin
Posts: 3805
Joined: 20 Jan 2012, 17:18
Contact:

Re: Group names on radio buttons

09 Jun 2014, 23:02

The property is also listed in the Radio Button documentation.
 
walhore
Topic Author
Posts: 19
Joined: 25 Feb 2013, 17:24

Re: Group names on radio buttons

10 Jun 2014, 16:02

Ah, thanks, I'll give it a try.

Who is online

Users browsing this forum: Google [Bot] and 4 guests