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
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
Placement
Gets the placement of the spacer.
public override Placement Placement { get; }
Property Value
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
intThe 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
PlacementThe new placement of the spacer.
Remarks
For more information, consider visiting the documentation available here.