GridLength Struct
Definition
Holds the width or height of a Avalonia.Controls.Grid's column and row definitions.
public struct GridLength
Constructors
| Name | Description |
|---|---|
| GridLength (2 overloads) | Initializes a new instance of the Avalonia.Controls.GridLength struct. |
GridLength overloads
GridLength Constructor
Initializes a new instance of the Avalonia.Controls.GridLength struct.
public GridLength(double value)
Parameters
value double
The size of the GridLength in device independent pixels.
GridLength Constructor
Initializes a new instance of the Avalonia.Controls.GridLength struct.
public GridLength(double value, Avalonia.Controls.GridUnitType type)
Parameters
value double
The size of the GridLength.
type Avalonia.Controls.GridUnitType
The unit of the GridLength.
Methods
| Name | Description |
|---|---|
| Equals (2 overloads) | Compares two GridLength structures for equality. |
| GetHashCode | Gets a hash code for the GridLength. |
| Parse | Parses a string to return a Avalonia.Controls.GridLength. |
| ParseLengths | Parses a string to return a collection of Avalonia.Controls.GridLengths. |
| ToString | Gets a string representation of the Avalonia.Controls.GridLength. |
Equals overloads
Equals Method
Compares two GridLength structures for equality.
public bool Equals(Avalonia.Controls.GridLength gridLength)
Parameters
gridLength Avalonia.Controls.GridLength
The structure with which to test equality.
Returns
bool
True if the structures are equal, otherwise false.
Equals Method
Determines whether the Avalonia.Controls.GridLength is equal to the specified object.
public bool Equals(object o)
Parameters
o object
The object with which to test equality.
Returns
bool
True if the objects are equal, otherwise false.
GetHashCode Method
Gets a hash code for the GridLength.
public int GetHashCode()
Returns
int
The hash code.
Parse Method
Parses a string to return a Avalonia.Controls.GridLength.
public Avalonia.Controls.GridLength Parse(string s)
Parameters
s string
The string.
Returns
ParseLengths Method
Parses a string to return a collection of Avalonia.Controls.GridLengths.
public System.Collections.Generic.IEnumerable<Avalonia.Controls.GridLength> ParseLengths(string s)
Parameters
s string
The string.
Returns
System.Collections.Generic.IEnumerable<Avalonia.Controls.GridLength>
ToString Method
Gets a string representation of the Avalonia.Controls.GridLength.
public string ToString()
Returns
string
The string representation.
Properties
| Name | Description |
|---|---|
| Auto | Gets an instance of Avalonia.Controls.GridLength that indicates that a row or column should auto-size to fit its content. |
| GridUnitType | Gets the unit of the Avalonia.Controls.GridLength. |
| IsAbsolute | Gets a value that indicates whether the Avalonia.Controls.GridLength has a Avalonia.Controls.GridLength.GridUnitType of Pixel. |
| IsAuto | Gets a value that indicates whether the Avalonia.Controls.GridLength has a Avalonia.Controls.GridLength.GridUnitType of Auto. |
| IsStar | Gets a value that indicates whether the Avalonia.Controls.GridLength has a Avalonia.Controls.GridLength.GridUnitType of Star. |
| Star | Gets an instance of Avalonia.Controls.GridLength that indicates that a row or column should fill its content. |
| Value | Gets the length. |
Auto Property
Gets an instance of Avalonia.Controls.GridLength that indicates that a row or column should auto-size to fit its content.
public Avalonia.Controls.GridLength Auto { get; set; }
GridUnitType Property
Gets the unit of the Avalonia.Controls.GridLength.
public Avalonia.Controls.GridUnitType GridUnitType { get; set; }
IsAbsolute Property
Gets a value that indicates whether the Avalonia.Controls.GridLength has a Avalonia.Controls.GridLength.GridUnitType of Pixel.
public bool IsAbsolute { get; set; }
IsAuto Property
Gets a value that indicates whether the Avalonia.Controls.GridLength has a Avalonia.Controls.GridLength.GridUnitType of Auto.
public bool IsAuto { get; set; }
IsStar Property
Gets a value that indicates whether the Avalonia.Controls.GridLength has a Avalonia.Controls.GridLength.GridUnitType of Star.
public bool IsStar { get; set; }
Star Property
Gets an instance of Avalonia.Controls.GridLength that indicates that a row or column should fill its content.
public Avalonia.Controls.GridLength Star { get; set; }
Value Property
Gets the length.
public double Value { get; set; }