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
weightint
Returns
Length(int)
Exactly cells, shrunk only if the fixed sizes don't fit.
public static Constraint Length(int cells)
Parameters
cellsint
Returns
Max(int)
Grows like Fill(1), up to cells.
public static Constraint Max(int cells)
Parameters
cellsint
Returns
Min(int)
At least cells, and grows like Fill(1).
public static Constraint Min(int cells)
Parameters
cellsint
Returns
Percentage(int)
A percentage of the available space, rounded down. Clamped to 0–100.
public static Constraint Percentage(int percent)
Parameters
percentint
Returns
Ratio(int, int)
numerator/denominator of the available space, rounded down.
public static Constraint Ratio(int numerator, int denominator)