Grid.GetColumn Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| GetColumn(BindableObject) |
Gets the column of the |
| GetColumn(IView) |
Gets the zero-based column index for the provided |
GetColumn(BindableObject)
- Source:
- Grid.cs
- Source:
- Grid.cs
- Source:
- Grid.cs
Gets the column of the bindable child element.
public:
static int GetColumn(Microsoft::Maui::Controls::BindableObject ^ bindable);
public static int GetColumn(Microsoft.Maui.Controls.BindableObject bindable);
static member GetColumn : Microsoft.Maui.Controls.BindableObject -> int
Public Shared Function GetColumn (bindable As BindableObject) As Integer
Parameters
- bindable
- BindableObject
An element that belongs to the Grid layout.
Returns
The column that the child element is in.
Remarks
The GetColumn(BindableObject) 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 SetColumn(BindableObject, Int32) method contain syntax for and information about the Column attached property.
Applies to
GetColumn(IView)
- Source:
- Grid.cs
- Source:
- Grid.cs
- Source:
- Grid.cs
Gets the zero-based column index for the provided view.
public:
virtual int GetColumn(Microsoft::Maui::IView ^ view);
public int GetColumn(Microsoft.Maui.IView view);
abstract member GetColumn : Microsoft.Maui.IView -> int
override this.GetColumn : Microsoft.Maui.IView -> int
Public Function GetColumn (view As IView) As Integer
Parameters
- view
- IView
The child view whose column index to retrieve. Can be a BindableObject or a virtual (non-bindable) view.
Returns
The zero-based column index; defaults to 0 for views that have not been positioned explicitly.
Implements
Exceptions
Thrown if view is a non-bindable view that has not been added to the grid.