Struct GridLength
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Size of a grid row or column: Auto, fixed DIPs, or a star weight.
public readonly record struct GridLength : IEquatable<GridLength>
- Implements
- Inherited Members
Constructors
GridLength(float, GridUnit)
Size of a grid row or column: Auto, fixed DIPs, or a star weight.
public GridLength(float Value, GridUnit Unit)
Parameters
Properties
Auto
Auto-sized.
public static GridLength Auto { get; }
Property Value
OneStar
One star.
public static GridLength OneStar { get; }
Property Value
Unit
public GridUnit Unit { get; init; }
Property Value
Value
public float Value { get; init; }
Property Value
Methods
Parse(string)
Parses "Auto", "", "2", "120".
public static GridLength Parse(string text)
Parameters
textstring
Returns
Pixels(float)
Fixed size.
public static GridLength Pixels(float value)
Parameters
valuefloat
Returns
Star(float)
Star weight.
public static GridLength Star(float weight = 1)
Parameters
weightfloat
Returns
Operators
implicit operator GridLength(float)
Fixed size from a number.
public static implicit operator GridLength(float pixels)
Parameters
pixelsfloat