Share via


RadioButtons.MaxColumns Properti

Definisi

Mendapatkan atau mengatur jumlah maksimum kolom yang disusun tombol radio.

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; }
var int32 = radioButtons.maxColumns;
radioButtons.maxColumns = int32;
Public Property MaxColumns As Integer

Nilai Properti

Int32

int

Jumlah maksimum kolom tempat tombol radio disusun. Defaultnya adalah 1.

Atribut
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Contoh

<!-- 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>

Enam tombol radio disusun dalam tiga kolom

Keterangan

Untuk informasi selengkapnya, panduan desain, dan contoh kode, lihat Tombol radio.

Secara default, RadioButtons kontrol mengatur tombol radionya secara vertikal dalam satu kolom. Anda dapat mengatur MaxColumns properti untuk membuat kontrol mengatur tombol radio di beberapa kolom. (Ketika Anda melakukan ini, item tersebut ditata dalam urutan utama kolom, di mana item mengisi dari atas ke bawah, lalu kiri ke kanan.)

Untuk mengatur item dalam satu baris horizontal, atur MaxColumns sama dengan jumlah item dalam grup.

Berlaku untuk

Lihat juga