Skip to content
ConsoleMonster
Struct

LayoutSize

ConsoleMonster.Layout

Namespace
ConsoleMonster.Layout
Assembly
ConsoleMonster
Base
ValueType
Modifiers
sealed

A size specification: LayoutSize.Auto, LayoutSize.Fixed cells, or a LayoutSize.Fraction of the remaining space with a minimum.

Inheritance

  • ValueType
  • LayoutSize

Usage

Explore 10 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 7

Accepted by parameters 3

Methods

public static LayoutSize Fixed(int cells) #

A fixed number of cells.

Parameters

cells int required
Cells.

Returns

LayoutSize The specification.
public static LayoutSize Fraction(double weight = 1, int min = 0) #

A share of the remaining space.

Parameters

weight double = 1 optional
Relative weight (default 1).
min int = 0 optional
Minimum cells.

Returns

LayoutSize The specification.
public LayoutSize Minimum(int min) #

Returns a copy with a different minimum.

Parameters

min int required
Minimum cells.

Returns

LayoutSize The specification.
public override string ToString() #

Returns the fully qualified type name of this instance.

Returns

string The fully qualified type name.

Properties

public LayoutSizeKind Kind { get; } #

The kind.

public double Value { get; } #

Cells for LayoutSizeKind.Fixed, weight for LayoutSizeKind.Fraction.

public int Min { get; } #

Minimum cells (used before a layout collapses or clips).

public static LayoutSize Auto { get; } #

Size to content.