Table of Contents

Enum TextStyle

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Defines non-color text style flags for an Attribute.

[Flags]
public enum TextStyle : byte

Fields

Slow blinking text.

Bold = 1

Bold text.

Faint = 2

Faint (dim) text.

Italic = 4

Italic text.

None = 0

No text style.

Reverse = 32

Reverse video (swaps foreground and background colors).

Strikethrough = 64

Strikethrough (crossed-out) text.

Underline = 8

Underlined text.

Remarks

Only a subset of ANSI SGR (Select Graphic Rendition) styles are represented. Styles that are poorly supported, non-visual, or redundant with other APIs are omitted.

Multiple styles can be combined using bitwise operations. Use TextStyle to get or set these styles on an Attribute.

Note that Bold and Faint may be mutually exclusive depending on the user's terminal and its settings. For instance, if a terminal displays faint text as a darker color, and bold text as a lighter color, then both cannot be shown at the same time, and it will be up to the terminal to decide which to display.