Table of Contents

Class HeightSpacer

Namespace
ConsoleAppVisuals.PassiveElements
Assembly
ConsoleAppVisuals.dll

The HeightSpacer is a passive element that displays a space between elements with a fixed height.

public class HeightSpacer : PassiveElement
Inheritance
HeightSpacer
Inherited Members

Remarks

For more information, consider visiting the documentation available here.

Constructors

HeightSpacer(int, Placement)

The HeightSpacer is a passive element that displays a space between elements with a fixed height.

public HeightSpacer(int height = 1, Placement placement = Placement.TopCenter)

Parameters

height int

The height of the spacer.

placement Placement

The placement of the spacer.

Remarks

For more information, consider visiting the documentation available here.

Properties

Height

Gets the height of the spacer.

public override int Height { get; }

Property Value

int

Placement

Gets the placement of the spacer.

public override Placement Placement { get; }

Property Value

Placement

Methods

RenderElementActions()

Defines the actions to perform when the element is called to be rendered on the console.

[Visual]
protected override void RenderElementActions()

UpdateHeight(int)

Updates the height of the spacer.

public void UpdateHeight(int newHeight)

Parameters

newHeight int

The new height of the spacer.

Remarks

For more information, consider visiting the documentation available here.

Exceptions

ArgumentOutOfRangeException

Thrown when the new height is negative or greater than the window height.

UpdatePlacement(Placement)

Updates the placement of the spacer.

public void UpdatePlacement(Placement newPlacement)

Parameters

newPlacement Placement

The new placement of the spacer.

Remarks

For more information, consider visiting the documentation available here.