Skip to content
ConsoleMonster

API Reference

Struct

LayoutSize

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 17 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 10

Methods

public static LayoutSize Fixed(Int32 cells) #
Returns: LayoutSize

A fixed number of cells.

Parameters

cells System.Int32 requiredposition: 0
Cells.

Returns

The specification.

public static LayoutSize Fraction(Double weight = 1, Int32 min = 0) #
Returns: LayoutSize

A share of the remaining space.

Parameters

weight System.Double = 1 optionalposition: 0
Relative weight (default 1).
min System.Int32 = 0 optionalposition: 1
Minimum cells.

Returns

The specification.

public override String ToString() #
Returns: String

Returns the fully qualified type name of this instance.

Returns

The fully qualified type name.

public LayoutSize WithMin(Int32 min) #
Returns: LayoutSize

Returns a copy with a different minimum.

Parameters

min System.Int32 requiredposition: 0
Minimum cells.

Returns

The specification.

Properties

public LayoutSizeKind Kind { get; } #

The kind.

public Double Value { get; } #

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

public Int32 Min { get; } #

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

public static LayoutSize Auto { get; } #

Size to content.