Xamarin.Forms Guides | Samples

Xamarin.Forms.ColumnDefinition Class

An IDefinition that defines properties for a column in a Grid.

See Also: ColumnDefinition


public sealed class ColumnDefinition : BindableObject, IDefinition


XAML for Xamarin.Forms supports the following property for the ColumnDefinition class:


"*" or "Auto" to indicate the corresponding GridUnitType enumeration values, or a number to indicate an absolute width.

App developers can specify GridUnitType values for the ColumnDefinition.Width property in XAML by nesting ColumnDefinition tags inside tags for the Grid.ColumnDefinitions collection property. The following example demonstrates setting three column widths to each of the three valid GridUnitType values:

XAML Example

    <ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="*" />
    <ColumnDefinition Width="100" />


Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions:,,,,,,

The members of Xamarin.Forms.ColumnDefinition are listed below.

See Also: BindableObject

Public Constructors

Creates a new ColumnDefinition object with default values.

Public Fields

static readonly
WidthPropertyBindableProperty. Backing store for the ColumnDefinition.Width property.

Public Properties

WidthGridLength. Gets or sets the width of the column.

Public Events

SizeChangedEvent that is raised when the size of the column is changed.