RadioButtons.MaxColumns 속성

정의

라디오 단추가 정렬된 최대 열 수를 가져오거나 설정합니다.

이 설명서는 UWP용 WinUI 2에 적용됩니다(Windows 앱 SDKWinUI의 경우 Windows 앱 SDK 네임스페이스 참조).

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

void MaxColumns(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 MaxColumns();

void MaxColumns(int value);
public int MaxColumns { [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 MaxColumns { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="1")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="1")] set; }
Public Property MaxColumns As Integer

속성 값

Int32

int

라디오 단추가 정렬된 최대 열 수입니다. 기본값은 1입니다.

특성
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

예제

<!-- xmlns:muxc="using:Microsoft.UI.Xaml.Controls -->
<muxc:RadioButtons Header="Options" MaxColumns="3">
    <x:String>Item 1</x:String>
    <x:String>Item 2</x:String>
    <x:String>Item 3</x:String>
    <x:String>Item 4</x:String>
    <x:String>Item 5</x:String>
    <x:String>Item 6</x:String>
</muxc:RadioButtons>

세 개의 열로 정렬된 6개의 라디오 단추

설명

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

기본적으로 RadioButtons 컨트롤은 단일 열에서 라디오 단추를 세로로 정렬합니다. 컨트롤이 MaxColumns 여러 열에서 라디오 단추를 정렬하도록 속성을 설정할 수 있습니다. (이렇게 하면 항목이 위쪽에서 아래쪽으로 채워진 다음, 왼쪽에서 오른쪽으로 채워지는 열 우선 순서로 배치됩니다.)

항목이 단일 가로 행으로 정렬되도록 하려면 MaxColumns를 그룹의 항목 수와 동일하게 설정합니다.

적용 대상

추가 정보