Xamarin.Forms.Core 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.Layout<Xamarin.Forms.View> Xamarin.Forms.View Xamarin.Forms.IGridController A layout that arranges views in rows and columns. The following example shows a basic use: The following shows Grids on the various platforms: It is convenient for the layout class arranges to store row and column indices of each of its child elements. Additionally, when a element is laid out with a grid, application developers can access and change the child's position and span from the child itself by using the , , , , static methods, and the equivalent static methods for columns and column spans. XAML for Xamarin.Forms supports the following properties for the class: Property Value Children Nested visual elements that are displayed in the Grid. ColumnDefinitions A list of ColumnDefinition specifications. See . ColumnSpacing An integer. RowDefinitions A list of RowDefinition specifications. See . RowSpacing An integer. XAML for Xamarin.Forms supports the following attached properties for the class: Attached Property Value Column An integer that represents the Column in which the item will appear. ColumnSpan An integer that represents the number of Columns that the item will span. Row An integer that represents the row in which the item will appear. RowSpan An integer that represents the number of rows that the item will span. The documentation for the following member methods contains XAML syntax examples: Constructor 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 Initializes a new instance of the Grid class. Property 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.Grid+IGridList<Xamarin.Forms.View> Gets the collection of child elements of the Grid. The collection of child elements. Application developers can use implicit collection syntax in XAML to add items to this collection, because this property is the ContentPropertyAttribute for the Grid class. Property 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.ColumnDefinitionCollection Provides the interface for the bound property that gets or sets the ordered collection of objects that control the layout of columns in the . A ColumnDefinitionCollection for the Grid instance. ColumnDefinitions is an ordered set of ColumnDefinition objects that determine the width of each column. Each successive ColumnDefintion controls the width of each successive column. If ColumnDefinitions is empty, or if there are more columns than definitions, then columns for which there is no definition are rendered as if they were controlled by a ColumnDefinition object that has its property set to . The property has XAML syntax support. The syntax for this operation is shown below. Field 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.BindableProperty Implements the property, and allows the class to bind it to properties on other objects at run time. Field 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.BindableProperty Implements the attached property that represents the zero-based column index of a child element. See Remarks. The interface for this property is defined by the and methods. Property 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Double Provides the interface for the bound property that gets or sets the distance between columns in the Grid. The space between columns in this layout. The property does not control spacing on the left and right edges of the layout. Application developers can control the spacing around the outside of the layout by setting the property of the visual element to which it belongs. Field 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.BindableProperty Implements the property, and allows the class to bind it to properties on other objects at run time. Field 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.BindableProperty Implements the attached property that represents the number of columns that a child element spans. See Remarks. The interface for this property is defined by the and methods. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Int32 An element that belongs to the Grid layout. Gets the column of the child element. The column that the child element is in. The method corresponds to the value that is set by the following XAML attached property. Attached Property Value Column An integer that represents the Column in which the item will appear. The remarks for the method contain syntax for and information about the Column attached property. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Int32 An element that belongs to the Grid layout. Gets the column span of the child element. The column that the child element is in. The method corresponds to the value that is set by the following XAML attached property. Attached Property Value ColumnSpan An integer that represents the number of Columns that the item will span. The remarks for the method contain syntax for and information about the ColumnSpan attached property. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Int32 An element that belongs to the Grid layout. Gets the row of the child element. The row that the child element is in. The method corresponds to the following XAML attached property: Attached Property Value Row An integer that represents the row in which the item will appear. The remarks for the method contain syntax for and information about the Row attached property. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Int32 An element that belongs to the Grid layout. Gets the row span of the child element. The row that the child element is in. The method corresponds to the following XAML attached properties: Attached Property Value RowSpan An integer that represents the number of rows that the item will span. The remarks for the method contain syntax for and information about the RowSpan attached property. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 System.Void Invalidates the grid layout. To be added. Method 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.Void For internal use by the Xamarin.Forms platform. For internal use by the Xamarin.Forms platform. To be added. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Void X-coordinate of the top left corner of the bounding rectangle. Y-coordinate of the top left corner of the bounding rectangle. Width of the bounding rectangle. Height of the bounding rectangle. Lays out the child elements when the layout is invalidated. To be added. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Void The element that was added. Method that is called when a child is added to this element. Method 1.4.0.0 1.5.0.0 2.0.0.0 System.Void Application developers override this to respond when the binding context changes. To be added. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Void The element that was removed. Method that is called when a child is removed from this element. To be added. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.") Xamarin.Forms.SizeRequest The requested width. The requested height. Method that is called when an attempt is made to resize this element. The new requested size. To be added. Property 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.RowDefinitionCollection Provides the interface for the bound property that gets or sets the collection of RowDefinition objects that control the heights of each row. A RowDefinitionCollection for the Grid instance. RowDefinitions is an ordered set of objects that determine the height of each column. Each successive RowDefintion controls the width of each successive column. If RowDefinitions is empty, or if there are more rows than definitions, then rows for which there is no definition are rendered as if they were controlled by a RowDefinition object that has its property set to . Field 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.BindableProperty Implements the property, and allows the class to bind it to properties on other objects at run time. To be added. Field 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.BindableProperty Implements the attached property that represents the zero-based row index of a child element. See Remarks. The interface for this property is defined by the and methods. Property 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Double Gets or sets the amount of space left between rows in the Grid. This is a bindable property. The space between rows The property does not control spacing on the top and bottom edges of the layout. Application developers can control the spacing around the outside of the layout by setting the property of the visual element to which it belongs. Field 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.BindableProperty Implements the property, and allows the class to bind it to properties on other objects at run time. Field 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.BindableProperty Implements the attached property that represents the number of rows that a child element spans, and allows the class to bind it to properties on other objects at run time. The interface for this property is defined by the and methods. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Void A child element of this Grid to move to a different column. The column in which to place the child element. Changes the column in which a child element will be placed. The method corresponds to the value that is set by the following XAML attached property. Attached Property Value ColumnSpan An integer that represents the Column in which the item will appear. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Void A child element of this Grid on which to assign a new column span. The new column span. Changes the column span of the specified child element. The method corresponds to the value that is set by the following XAML attached property. Attached Property Value Column An integer that represents the number of Columns that the item will span. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Void A child element of this Grid to move to a different row. The row in which to place the child element. Changes the row in which a child element will be placed. The method corresponds to the following XAML attached property: Attached Property Value Row An integer that represents the row in which the item will appear. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Void A child element of this Grid on which to assign a new row span. The new row span. Changes the row span of the specified child element. The method corresponds to the following XAML attached property: Attached Property Value RowSpan An integer that represents the number of rows that the item will span.