GridLength GridLength Struct


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

public struct GridLength
type GridLength = struct


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.


GridLength(Double) GridLength(Double)

Initializes a new Absolute GridLength.

GridLength(Double, GridUnitType) GridLength(Double, GridUnitType)

Initializes a new GridLength.


Auto Auto

A ready to reuse GridLength of GridUnitType.Auto.

GridUnitType GridUnitType

Gets or sets the GridUnitType of the GridLength

IsAbsolute IsAbsolute

Gets whether or not the GridUnitType of the GridLength is GridUnitType.Absolute.

IsAuto IsAuto

Gets whether or not the GridUnitType of the GridLength is GridUnitType.Auto.

IsStar IsStar

Gets a value that indicates whether the GridUnitType of the GridLength is GridUnitType.Star.

Star Star

A ready to reuse GridLength of GridUnitType.Star with a Value of 1.

Value Value

Gets the Value of the GridLength.


Equals(Object) Equals(Object)

Test the equality of this GridLength and another one.

GetHashCode() GetHashCode()

Returns a value that is used for efficient storage of this object in collections.

ToString() ToString()

Returns the value and the grid unit type, separated by a ".".


Implicit(Double to GridLength) Implicit(Double to GridLength)

Casting operator to convert a double into a GridLength of type GridUnitType.Absolute

Applies to