EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

Grid.Column attached property

Applies to Windows and Windows Phone

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

int

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

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

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

Metadata

Windows.winmd

See also

Grid
Attached properties overview
Quickstart: Defining layouts

 

 

Mostrar:
© 2014 Microsoft