Table of Contents

Class SeparatorElement

Namespace
SharpConsoleUI.Panel
Assembly
SharpConsoleUI.dll

A panel element that displays a single separator character.

public class SeparatorElement : PanelElement, IPanelElement
Inheritance
SeparatorElement
Implements
Inherited Members
Extension Methods

Constructors

SeparatorElement(string?)

Initializes a new SeparatorElement.

public SeparatorElement(string? name = null)

Parameters

name string

Optional element name. Defaults to "separator".

Properties

FixedWidth

Gets the fixed width of this element, or null if it uses MeasureWidth() or flex sizing.

public override int? FixedWidth { get; }

Property Value

int?

SeparatorChar

Gets or sets the separator character to display.

public char SeparatorChar { get; set; }

Property Value

char

SeparatorColor

Gets or sets an optional separator color override.

public Color? SeparatorColor { get; set; }

Property Value

Color?

Methods

Render(CharacterBuffer, int, int, int, Color, Color)

Renders the element into the character buffer at the specified position.

public override void Render(CharacterBuffer buffer, int x, int y, int width, Color fg, Color bg)

Parameters

buffer CharacterBuffer

The character buffer to render into.

x int

The x position to render at.

y int

The y position to render at.

width int

The allocated width for this element.

fg Color

The default foreground color.

bg Color

The default background color.