Table of Contents

Constructor GridLength

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

GridLength(float)

Initializes a new instance of the GridLength struct as an absolute value in pixels.

public GridLength(float pixels)

Parameters

pixels float

Specifies the number of 'device-independent pixels' (96 pixels-per-inch).

Exceptions

ArgumentException

If pixels parameter is Coord.NaN or pixels parameter is Coord.NegativeInfinity or pixels parameter is Coord.PositiveInfinity.

GridLength(float, GridUnitType)

Initializes a new instance of the GridLength struct and specifies what kind of value it will hold.

public GridLength(float value = 0, GridUnitType type = GridUnitType.Auto)

Parameters

value float

Value to be stored by this GridLength instance.

type GridUnitType

Type of the value to be stored by this GridLength instance.

Remarks

If the type parameter is GridUnitType.Auto, then passed in value is ignored and replaced with 1.

Exceptions

ArgumentException

If value parameter is infinity or is not a number.