Table of Contents

Struct BoxChars

Namespace
SharpConsoleUI.Drawing
Assembly
SharpConsoleUI.dll

Box drawing character sets for borders and frames. Provides predefined character sets and a helper method to get characters from BorderStyle.

public readonly record struct BoxChars : IEquatable<BoxChars>
Implements
Inherited Members

Constructors

BoxChars(char, char, char, char, char, char)

Box drawing character sets for borders and frames. Provides predefined character sets and a helper method to get characters from BorderStyle.

public BoxChars(char TopLeft, char TopRight, char BottomLeft, char BottomRight, char Horizontal, char Vertical)

Parameters

TopLeft char
TopRight char
BottomLeft char
BottomRight char
Horizontal char
Vertical char

Properties

Ascii

ASCII box characters for terminals with limited character support.

public static BoxChars Ascii { get; }

Property Value

BoxChars

BottomLeft

public char BottomLeft { get; init; }

Property Value

char

BottomRight

public char BottomRight { get; init; }

Property Value

char

Double

Double-line box characters.

public static BoxChars Double { get; }

Property Value

BoxChars

Horizontal

public char Horizontal { get; init; }

Property Value

char

None

Empty box characters (spaces) for invisible borders that preserve layout.

public static BoxChars None { get; }

Property Value

BoxChars

Rounded

Rounded box characters (single-line with rounded corners).

public static BoxChars Rounded { get; }

Property Value

BoxChars

Single

Single-line box characters.

public static BoxChars Single { get; }

Property Value

BoxChars

TopLeft

public char TopLeft { get; init; }

Property Value

char

TopRight

public char TopRight { get; init; }

Property Value

char

Vertical

public char Vertical { get; init; }

Property Value

char

Methods

FromBorderStyle(BorderStyle, bool)

Gets BoxChars for the specified BorderStyle.

public static BoxChars FromBorderStyle(BorderStyle style, bool isActive = true)

Parameters

style BorderStyle

The border style to get characters for.

isActive bool

For DoubleLine style, whether to use double (active) or single (inactive) characters.

Returns

BoxChars

The appropriate BoxChars for the style.