Share via


GridExtensions.AddWithSpan(Grid, IView, Int32, Int32, Int32, Int32) Method

Definition

Adds an IView to the the Grid at the specified row and column with the specified row and column spans.

public static void AddWithSpan (this Microsoft.Maui.Controls.Grid grid, Microsoft.Maui.IView view, int row = 0, int column = 0, int rowSpan = 1, int columnSpan = 1);
static member AddWithSpan : Microsoft.Maui.Controls.Grid * Microsoft.Maui.IView * int * int * int * int -> unit
<Extension()>
Public Sub AddWithSpan (grid As Grid, view As IView, Optional row As Integer = 0, Optional column As Integer = 0, Optional rowSpan As Integer = 1, Optional columnSpan As Integer = 1)

Parameters

grid
Grid

The Grid to which the IView will be added.

view
IView

The IView to add.

row
Int32

The top row in which to place the IView. Defaults to 0.

column
Int32

The left column in which to place the IView. Defaults to 0.

rowSpan
Int32

The number of rows the IView should span. Defaults to 1.

columnSpan
Int32

The number of columns the IView should span. Defaults to 1.

Exceptions

Thrown when view is null.

Thrown when row or column are less than 0, or rowSpan or columnSpan are less than 1.

Remarks

If the Grid does not have enough rows/columns to encompass the specified spans, they will be added.

Applies to