다음을 통해 공유


RadioButtons.SelectedIndex 속성

정의

선택한 라디오 단추의 인덱스 를 가져오거나 설정합니다.

public:
 property int SelectedIndex { int get(); void set(int value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")]
int SelectedIndex();

void SelectedIndex(int value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")]
int SelectedIndex();

void SelectedIndex(int value);
public int SelectedIndex { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")]
public int SelectedIndex { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")] set; }
var int32 = radioButtons.selectedIndex;
radioButtons.selectedIndex = int32;
Public Property SelectedIndex As Integer

속성 값

Int32

int

선택한 라디오 단추의 인덱스입니다. 기본값은 라디오 단추가 선택되지 않음을 나타내는 -1입니다.

특성
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

설명

자세한 정보, 디자인 지침 및 코드 예제는 라디오 단추를 참조하세요.

SelectedItemSelectedIndex 가 동기화됩니다. 두 속성 중 하나를 변경하면 다른 속성이 변경됩니다. Items 컬렉션 범위를 벗어나는 값으로 설정 SelectedIndex 하면 가 됩니다 SelectedItemnull.

적용 대상

추가 정보