Grid.Column attached property

Gets or sets the column alignment of an element when child layout is processed by a parent Grid layout container.

<object Grid.Column="int"/>

XAML Values


The zero-based index of the Grid column that the element should appear within. See Remarks.


Grid.Column is an attached property, which supports a XAML usage. When setting this property in code, use SetColumn instead. When getting this property in code, use GetColumn instead. In code usages, the target parameter is the object where the attached property value is set. Another way to get or set the value in code is to use the dependency property system, calling either GetValue or SetValue and passing ColumnProperty as the dependency property identifier.

A Grid.Column value is interpreted by the most immediate parent Grid element from where the value is set. The value is used along with Grid.Row to specify the layout characteristics of each child element of a Grid. Grid.ColumnSpan also influences the layout.

The row and column counts are zero-based. Negative integer values for Grid.Column are not permitted. You establish the layout characteristics of a Grid by setting the RowDefinitions and ColumnDefinitions properties. These are collections that contain one or more RowDefinition / ColumnDefinition objects, which are typically specified as elements in XAML.

Requirements (Windows 10 device family)

Device family

API contract




Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]





See also

Attached properties overview
Define layouts with XAML