This documentation is archived and is not being maintained.
RadioButton::GroupName Property
Visual Studio 2010
Gets or sets the name that specifies which RadioButton controls are mutually exclusive.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
[LocalizabilityAttribute(LocalizationCategory::NeverLocalize)] public: property String^ GroupName { String^ get (); void set (String^ value); }
<object GroupName="string" .../>
Property Value
Type: System::StringThe name that specifies which RadioButton controls are mutually exclusive. The default is an empty string.
When two or more RadioButton controls have the same GroupName, a user can select only one RadioButton at a time.
The following code sample creates two separate RadioButton groups: colorgrp and numgrp. The user can choose one RadioButton in each group.
<StackPanel> <RadioButton GroupName="colorgrp">Red</RadioButton> <RadioButton GroupName="colorgrp">Blue</RadioButton> <RadioButton GroupName="numgrp">1</RadioButton> <RadioButton GroupName="numgrp">2</RadioButton> </StackPanel>
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: