Grid.ColumnDefinitions property

Applies to Windows and Windows Phone

Gets a list of ColumnDefinition objects defined on this instance of Grid.

Syntax


Public ReadOnly Property ColumnDefinitions As ColumnDefinitionCollection


<Grid>
  <Grid.ColumnDefinitions>
    oneOrMoreColumnDefinitions
  </Grid.ColumnDefinitions>
</Grid>

XAML Values

oneOrMoreColumnDefinitions

One or more ColumnDefinition elements. Each such ColumnDefinition becomes a placeholder representing a column in the final grid layout.

Property value

Type: ColumnDefinitionCollection

A list of ColumnDefinition objects defined on this instance of Grid.

Examples

The following example creates a Grid with two columns by using ColumnDefinitions.


<Grid.ColumnDefinitions>
    <ColumnDefinition Width="250" />
    <ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

Grid
RowDefinitions
Quickstart: Defining layouts

 

 

Show:
© 2014 Microsoft