Share via


Grid.GetColumnSpan Method

Definition

Overloads

GetColumnSpan(BindableObject)

Gets the column span of the bindable child element.

GetColumnSpan(IView)

Gets the number of columns spanned by the provided view.

GetColumnSpan(BindableObject)

Source:
Grid.cs
Source:
Grid.cs
Source:
Grid.cs

Gets the column span of the bindable child element.

public:
 static int GetColumnSpan(Microsoft::Maui::Controls::BindableObject ^ bindable);
public static int GetColumnSpan(Microsoft.Maui.Controls.BindableObject bindable);
static member GetColumnSpan : Microsoft.Maui.Controls.BindableObject -> int
Public Shared Function GetColumnSpan (bindable As BindableObject) As Integer

Parameters

bindable
BindableObject

An element that belongs to the Grid layout.

Returns

The number of columns spanned by the element; defaults to 1.

Remarks

The GetColumnSpan(BindableObject) method corresponds to the value that is set by the following XAML attached property.

Attached PropertyValue
ColumnSpan

An integer that represents the number of Columns that the item will span.

The remarks for the SetColumnSpan(BindableObject, Int32) method contain syntax for and information about the ColumnSpan attached property.

Applies to

GetColumnSpan(IView)

Source:
Grid.cs
Source:
Grid.cs
Source:
Grid.cs

Gets the number of columns spanned by the provided view.

public:
 virtual int GetColumnSpan(Microsoft::Maui::IView ^ view);
public int GetColumnSpan(Microsoft.Maui.IView view);
abstract member GetColumnSpan : Microsoft.Maui.IView -> int
override this.GetColumnSpan : Microsoft.Maui.IView -> int
Public Function GetColumnSpan (view As IView) As Integer

Parameters

view
IView

The child view whose column span to retrieve.

Returns

The column span; defaults to 1.

Implements

Exceptions

Thrown if view is a non-bindable view that has not been added to the grid.

Applies to