-api-id | -api-type |
---|---|
P:Microsoft.UI.Xaml.Controls.Grid.ColumnDefinitions |
winrt property |
Gets a list of ColumnDefinition objects defined on this instance of Grid.
<Grid>
<Grid.ColumnDefinitions>
oneOrMoreColumnDefinitions
</Grid.ColumnDefinitions>
</Grid>
- oneOrMoreColumnDefinitions
- oneOrMoreColumnDefinitionsOne or more ColumnDefinition elements. Each such ColumnDefinition becomes a placeholder representing a column in the final grid layout.
A list of ColumnDefinition objects defined on this instance of Grid.
The following example creates a Grid with two columns by using ColumnDefinitions. You can do this using the new succinct syntax or the original syntax - both are accurate and produce the equivalent result. See examples of both below:
Using new succinct syntax:
[!code-xamlColumnDefNewSyntaxSample]
Using the original syntax:
[!code-xamlColumnDefOldSyntaxSample]