Share via


GridExtensions.AddWithSpan(Grid, IView, Int32, Int32, Int32, Int32) 方法

定義

IView將 加入至Grid位於指定之數據列和數據行的 ,其中包含指定的數據列和數據行範圍。

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)

參數

grid
Grid

Grid 加入 的 IView

view
IView

要加入的 IView

row
Int32

要在其中放置 IView的頂端數據列。 預設為 0。

column
Int32

要在其中放置的 IView左欄。 預設為 0。

rowSpan
Int32

IView 應跨越的資料列數。 預設值為 1。

columnSpan
Int32

IView 應跨越的資料行數。 預設值為 1。

例外狀況

view 為 null 時擲回。

當或 column 小於 0 或 rowSpancolumnSpan 小於 1 時row擲回。

備註

Grid如果 沒有足夠的數據列/數據行可以包含指定的範圍,則會新增它們。

適用於