RadioButton.GroupName Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the name that specifies which RadioButton controls are mutually exclusive.
public:
property System::String ^ GroupName { System::String ^ get(); void set(System::String ^ value); };
[System.Windows.Localizability(System.Windows.LocalizationCategory.NeverLocalize)]
public string GroupName { get; set; }
[<System.Windows.Localizability(System.Windows.LocalizationCategory.NeverLocalize)>]
member this.GroupName : string with get, set
Public Property GroupName As String
Property Value
The name that specifies which RadioButton controls are mutually exclusive. The default is an empty string.
- Attributes
Examples
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>
Remarks
When two or more RadioButton controls have the same GroupName, a user can select only one RadioButton at a time.
Dependency Property Information
Identifier field | GroupNameProperty |
Metadata properties set to true |
None |
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET