Export (0) Print
Expand All

Grid.Column Attached Property

Gets or sets a value that indicates which column child content within a Grid should appear in.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)

See GetColumn, SetColumn
<object Grid.Column="int"/>

Property Value

Type: System.Int32
An Int32 value that represents the column in which child content should appear. The default value is 0.

Dependency property identifier field: ColumnProperty

Columns in a Grid are defined using the ColumnDefinition element.

The following example displays a TextBlock that is positioned in the first column and first row of a Grid.


<TextBlock Margin="2" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
       TextWrapping="Wrap">
This TextBlock is positioned in the first column and the 
first row (column 0, row 0) and spans across all three columns (ColumnSpan 3).
</TextBlock>


Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft