RadioButton.GroupName 속성

정의

상호 배타적인 컨트롤을 지정하는 RadioButton 이름을 가져오거나 설정합니다.

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

속성 값

상호 배타적인 컨트롤을 지정하는 RadioButton 이름입니다. 기본값은 빈 문자열입니다.

특성

예제

다음 코드 샘플에서는 두 개의 개별 RadioButton 그룹을 colorgrpnumgrp만듭니다. 사용자는 각 그룹에서 하나를 RadioButton 선택할 수 있습니다.

<StackPanel>
    <RadioButton GroupName="colorgrp">Red</RadioButton>
    <RadioButton GroupName="colorgrp">Blue</RadioButton>
    <RadioButton GroupName="numgrp">1</RadioButton>
    <RadioButton GroupName="numgrp">2</RadioButton>
</StackPanel>

설명

둘 이상의 RadioButton 컨트롤이 같 GroupName으면 사용자는 한 번에 하나 RadioButton 만 선택할 수 있습니다.

종속성 속성 정보

항목 가치
식별자 필드 GroupNameProperty
메타데이터 속성이 다음으로 설정됩니다. true None

적용 대상