Xamarin.Forms Guides | Samples

Xamarin.Forms.GridLength Structure

Used to define the size (width/height) of Grid ColumnDefinition and RowDefinition.

See Also: GridLength


public struct GridLength


GridLength of type GridUnitType.Absolute represents exact size. The ones of type GridUnitType.Auto adapts for fitting the size of the elements in the gird column/row. GridLenght of type GridUnitType.Star are used to split the available size in proportional buckets.

This valuetype is readonly.


Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions:,,,,,,

The members of Xamarin.Forms.GridLength are listed below.

See Also: ValueType

Public Constructors

Initializes a new Absolute GridLength.
Initializes a new GridLength.

Public Properties

AutoGridLength. A ready to reuse GridLength of GridUnitType.Auto.
GridUnitTypeGridUnitType. Gets or sets the GridUnitType of the GridLength
IsAbsoluteBoolean. Gets wether or not the GridUnitType of the GridLength is GridUnitType.Absolute.
IsAutoBoolean. Gets wether or not the GridUnitType of the GridLength is GridUnitType.Auto.
IsStarBoolean. Gets a value that indicates whether the GridUnitType of the GridLength is GridUnitType.Star.
StarGridLength. A ready to reuse GridLength of GridUnitType.Star with a Value of 1.
ValueDouble. Gets the Value of the GridLength.

Public Methods

Equals(Object) : Boolean
Test the equality of this GridLength and another one.
GetHashCode() : Int32
Returns a value that is used for efficient storage of this object in collections.
ToString() : String
Returns the value and the grid unit type, separated by a ".".

Public Operators

Conversion to Xamarin.Forms.GridLength(Implicit)Casting operator to convert a double into a GridLength of type GridUnitType.Absolute