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
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για