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
- Extension Methods
Constructors
BoxChars(char, char, char, char, char, 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, char TopTee, char BottomTee, char LeftTee, char RightTee, char Cross)
Parameters
TopLeftcharTopRightcharBottomLeftcharBottomRightcharHorizontalcharVerticalcharTopTeecharBottomTeecharLeftTeecharRightTeecharCrosschar
Properties
Ascii
ASCII box characters for terminals with limited character support.
public static BoxChars Ascii { get; }
Property Value
BottomLeft
public char BottomLeft { get; init; }
Property Value
BottomRight
public char BottomRight { get; init; }
Property Value
BottomTee
public char BottomTee { get; init; }
Property Value
Cross
public char Cross { get; init; }
Property Value
Double
Double-line box characters.
public static BoxChars Double { get; }
Property Value
Horizontal
public char Horizontal { get; init; }
Property Value
LeftTee
public char LeftTee { get; init; }
Property Value
None
Empty box characters (spaces) for invisible borders that preserve layout.
public static BoxChars None { get; }
Property Value
RightTee
public char RightTee { get; init; }
Property Value
Rounded
Rounded box characters (single-line with rounded corners).
public static BoxChars Rounded { get; }
Property Value
Single
Single-line box characters.
public static BoxChars Single { get; }
Property Value
TopLeft
public char TopLeft { get; init; }
Property Value
TopRight
public char TopRight { get; init; }
Property Value
TopTee
public char TopTee { get; init; }
Property Value
Vertical
public char Vertical { get; init; }
Property Value
Methods
FromBorderStyle(BorderStyle, bool)
Gets BoxChars for the specified BorderStyle.
public static BoxChars FromBorderStyle(BorderStyle style, bool isActive = true)
Parameters
styleBorderStyleThe border style to get characters for.
isActiveboolFor DoubleLine style, whether to use double (active) or single (inactive) characters.
Returns
- BoxChars
The appropriate BoxChars for the style.