RadioButtons.MaxColumns 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 maximum number of columns the radio buttons are arranged in.
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
Property Value
int
The maximum number of columns the radio buttons are arranged in. The default is 1.
- Attributes
-
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute
Examples
<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>
</RadioButtons>
Remarks
For more info, design guidance, and code examples, see Radio buttons.
By default, the RadioButtons
control arranges its radio buttons vertically in a single column. You can set the MaxColumns
property to make the control arrange the radio buttons in multiple columns. (When you do this, they are laid out in column-major order, where items fill in from top to bottom, then left to right.)
To have items arranged in a single horizontal row, set MaxColumns
equal to the number of items in the group.