Table of Contents

Struct GridLength

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

GridLength is the type used for various length-like properties in the system, that explicitly support Star unit type. For example, "Width", "Height" properties of ColumnDefinition and RowDefinition used by Grid.

[TypeConverter(typeof(GridLengthConverter))]
public readonly struct GridLength : IEquatable<GridLength>
Implements

Constructors

GridLength(double)

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

GridLength(double, GridUnitType)

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

Fields

Auto

Represents a GridLength whose value is determined by the size properties of the content object.

Star

Represents a GridLength whose value is expressed as a weighted proportion of available space.

Properties

GridUnitType

Gets the type of value held by the GridLength.

IsAbsolute

Gets a value that indicates whether the GridLength holds an absolute value in pixels.

IsAuto

Gets a value that indicates whether the GridLength holds an automatic value.

IsStar

Gets a value that indicates whether the GridLength holds a weighted proportion of available space.

Value

Gets the value held by the GridLength.

Methods

Equals(GridLength)

Determines whether the specified value is equal to the current GridLength.

Equals(object)

Determines whether the specified object is equal to the current GridLength.

GetHashCode()

Returns the hash code for the current GridLength.

ToString()

Returns a string representation of the current GridLength.

Operators

operator ==(GridLength, GridLength)

Determines whether two specified instances of GridLength are equal.

operator !=(GridLength, GridLength)

Determines whether two specified instances of GridLength are not equal.