Table of Contents

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

Value float
Unit GridUnit

Properties

Auto

Auto-sized.

public static GridLength Auto { get; }

Property Value

GridLength

OneStar

One star.

public static GridLength OneStar { get; }

Property Value

GridLength

Unit

public GridUnit Unit { get; init; }

Property Value

GridUnit

Value

public float Value { get; init; }

Property Value

float

Methods

Parse(string)

Parses "Auto", "", "2", "120".

public static GridLength Parse(string text)

Parameters

text string

Returns

GridLength

Pixels(float)

Fixed size.

public static GridLength Pixels(float value)

Parameters

value float

Returns

GridLength

Star(float)

Star weight.

public static GridLength Star(float weight = 1)

Parameters

weight float

Returns

GridLength

Operators

implicit operator GridLength(float)

Fixed size from a number.

public static implicit operator GridLength(float pixels)

Parameters

pixels float

Returns

GridLength