Table of Contents

Struct Grid.TrackSize

Namespace
Xui.Core.UI.Layout
Assembly
Xui.Core.dll

Represents a single CSS grid track sizing value such as a length, fr unit, auto, min-content, max-content, minmax(), or fit-content().

public readonly struct Grid.TrackSize
Inherited Members

Fields

Auto

The track sizes to content automatically. Equivalent to CSS auto.

public static readonly Grid.TrackSize Auto

Field Value

Grid.TrackSize

MaxContent

The track is sized to the largest max-content contribution of its items. Equivalent to CSS max-content.

public static readonly Grid.TrackSize MaxContent

Field Value

Grid.TrackSize

MinContent

The track is sized to the smallest size that fits its content without overflow. Equivalent to CSS min-content.

public static readonly Grid.TrackSize MinContent

Field Value

Grid.TrackSize

Properties

Kind

The kind of track sizing function.

public Grid.TrackSizeKind Kind { get; }

Property Value

Grid.TrackSizeKind

MaxValue

Maximum value for MinMax and FitContent tracks.

public NFloat MaxValue { get; }

Property Value

NFloat

MinValue

Minimum value for MinMax tracks.

public NFloat MinValue { get; }

Property Value

NFloat

Value

Pixel length for the track.

public NFloat Value { get; }

Property Value

NFloat

Methods

FitContent(NFloat)

Creates a fit-content(max) track clamped to the given pixel maximum.

public static Grid.TrackSize FitContent(NFloat max)

Parameters

max NFloat

Returns

Grid.TrackSize

Fr(NFloat)

Creates a fractional track. Fr(1) = CSS 1fr.

public static Grid.TrackSize Fr(NFloat fr)

Parameters

fr NFloat

Returns

Grid.TrackSize

MinMax(NFloat, NFloat)

Creates a minmax(min, max) track with pixel min and max values.

public static Grid.TrackSize MinMax(NFloat min, NFloat max)

Parameters

min NFloat
max NFloat

Returns

Grid.TrackSize

Px(NFloat)

Creates a track of an exact pixel length.

public static Grid.TrackSize Px(NFloat px)

Parameters

px NFloat

Returns

Grid.TrackSize

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

implicit operator TrackSize(double)

Implicitly converts a pixel value to a Length track.

public static implicit operator Grid.TrackSize(double px)

Parameters

px double

Returns

Grid.TrackSize

implicit operator TrackSize(int)

Implicitly converts a pixel value to a Length track.

public static implicit operator Grid.TrackSize(int px)

Parameters

px int

Returns

Grid.TrackSize

implicit operator TrackSize(NFloat)

Implicitly converts a pixel value to a Length track.

public static implicit operator Grid.TrackSize(NFloat px)

Parameters

px NFloat

Returns

Grid.TrackSize

implicit operator TrackSize(float)

Implicitly converts a pixel value to a Length track.

public static implicit operator Grid.TrackSize(float px)

Parameters

px float

Returns

Grid.TrackSize