Table of Contents

Class Controls

Namespace
SharpConsoleUI.Builders
Assembly
SharpConsoleUI.dll

Static factory class for creating control builders

public static class Controls
Inheritance
Controls
Inherited Members

Methods

BarGraph()

Creates a new bar graph builder

public static BarGraphBuilder BarGraph()

Returns

BarGraphBuilder

A new bar graph builder

Button(string)

Creates a new button builder

public static ButtonBuilder Button(string text = "Button")

Parameters

text string

The initial button text

Returns

ButtonBuilder

A new button builder

Checkbox(string)

Creates a new checkbox builder

public static CheckboxBuilder Checkbox(string label)

Parameters

label string

The checkbox label

Returns

CheckboxBuilder

A new checkbox builder

Dropdown(string?)

Creates a new dropdown builder

public static DropdownBuilder Dropdown(string? prompt = null)

Parameters

prompt string

The dropdown prompt text

Returns

DropdownBuilder

A new dropdown builder

Error(string)

Creates an error message (red color)

public static MarkupControl Error(string text)

Parameters

text string

The error text

Returns

MarkupControl

A configured markup control

Figlet(string?)

Creates a new Figlet text control builder

public static FigleControlBuilder Figlet(string? text = null)

Parameters

text string

The FIGlet ASCII art text

Returns

FigleControlBuilder

A new Figlet control builder

Header(string, string)

Creates a header text (bold and colored)

public static MarkupControl Header(string text, string color = "yellow")

Parameters

text string

The header text

color string

The header color (default: yellow)

Returns

MarkupControl

A configured markup control

HorizontalGrid()

Creates a new horizontal grid builder

public static HorizontalGridBuilder HorizontalGrid()

Returns

HorizontalGridBuilder

A new horizontal grid builder

Info(string)

Creates an info message (blue color)

public static MarkupControl Info(string text)

Parameters

text string

The info text

Returns

MarkupControl

A configured markup control

Label(string)

Creates a text label (markup without formatting)

public static MarkupControl Label(string text)

Parameters

text string

The label text

Returns

MarkupControl

A configured markup control

List(string?)

Creates a new list builder

public static ListBuilder List(string? title = null)

Parameters

title string

The initial list title

Returns

ListBuilder

A new list builder

Markup(string?)

Creates a new markup builder

public static MarkupBuilder Markup(string? initialLine = null)

Parameters

initialLine string

The initial line of markup

Returns

MarkupBuilder

A new markup builder

Menu()

Creates a new menu builder

public static MenuBuilder Menu()

Returns

MenuBuilder

A new menu builder

MultilineEdit(string?)

Creates a new multiline edit control builder

public static MultilineEditControlBuilder MultilineEdit(string? content = null)

Parameters

content string

Optional initial content

Returns

MultilineEditControlBuilder

A new multiline edit control builder

Panel()

Creates a new panel builder for bordered content panels

public static PanelBuilder Panel()

Returns

PanelBuilder

A new panel builder

Panel(string)

Creates a panel control with text content

public static PanelControl Panel(string content)

Parameters

content string

The text content (supports Spectre markup)

Returns

PanelControl

A configured panel control

ProgressBar()

Creates a new progress bar builder

public static ProgressBarBuilder ProgressBar()

Returns

ProgressBarBuilder

A new progress bar builder

Prompt(string)

Creates a new prompt builder

public static PromptBuilder Prompt(string prompt = "> ")

Parameters

prompt string

The prompt text

Returns

PromptBuilder

A new prompt builder

Rule(string?)

Creates a new rule control

public static RuleControl Rule(string? title = null)

Parameters

title string

The rule title

Returns

RuleControl

A configured rule control

RuleBuilder()

Creates a new rule builder for horizontal separator lines

public static RuleBuilder RuleBuilder()

Returns

RuleBuilder

A new rule builder

ScrollablePanel()

Creates a new scrollable panel builder

public static ScrollablePanelBuilder ScrollablePanel()

Returns

ScrollablePanelBuilder

A new scrollable panel builder

Separator()

Creates a horizontal separator rule

public static RuleControl Separator()

Returns

RuleControl

A configured rule control

Sparkline()

Creates a new sparkline graph builder

public static SparklineBuilder Sparkline()

Returns

SparklineBuilder

A new sparkline builder

Success(string)

Creates a success message (green color)

public static MarkupControl Success(string text)

Parameters

text string

The success text

Returns

MarkupControl

A configured markup control

Toolbar()

Creates a new toolbar builder

public static ToolbarBuilder Toolbar()

Returns

ToolbarBuilder

A new toolbar builder

Tree()

Creates a new tree control builder

public static TreeControlBuilder Tree()

Returns

TreeControlBuilder

A new tree control builder

VerticalSeparator()

Creates a vertical separator control

public static SeparatorControl VerticalSeparator()

Returns

SeparatorControl

A configured separator control

VerticalSeparator(int)

Creates a vertical separator control with horizontal margin

public static SeparatorControl VerticalSeparator(int horizontalMargin)

Parameters

horizontalMargin int

The margin on left and right sides

Returns

SeparatorControl

A configured separator control

Warning(string)

Creates a warning message (orange color)

public static MarkupControl Warning(string text)

Parameters

text string

The warning text

Returns

MarkupControl

A configured markup control