Table of Contents

Class Constraint

Namespace
MiniTui
Assembly
MiniTui.dll

How much space a layout region gets along the layout's axis (§7).

public abstract record Constraint : IEquatable<Constraint>
Inheritance
Constraint
Implements
Inherited Members

Methods

Fill(int)

Shares the leftover space with other growable regions, in proportion to weight.

public static Constraint Fill(int weight = 1)

Parameters

weight int

Returns

Constraint

Length(int)

Exactly cells, shrunk only if the fixed sizes don't fit.

public static Constraint Length(int cells)

Parameters

cells int

Returns

Constraint

Max(int)

Grows like Fill(1), up to cells.

public static Constraint Max(int cells)

Parameters

cells int

Returns

Constraint

Min(int)

At least cells, and grows like Fill(1).

public static Constraint Min(int cells)

Parameters

cells int

Returns

Constraint

Percentage(int)

A percentage of the available space, rounded down. Clamped to 0–100.

public static Constraint Percentage(int percent)

Parameters

percent int

Returns

Constraint

Ratio(int, int)

numerator/denominator of the available space, rounded down.

public static Constraint Ratio(int numerator, int denominator)

Parameters

numerator int
denominator int

Returns

Constraint