Skip to content
ConsoleMonster
Class

Ui

ConsoleMonster

Namespace
ConsoleMonster
Assembly
ConsoleMonster
Source
Ui.cs:12
Modifiers
static

The fluent entry point: empty widgets, named configuration and Content builders. Initializers use the same object model.

Inheritance

  • object
  • Ui

Methods

public static Accordion Accordion() #

A group of collapsible sections that keeps one open.

Returns

Accordion The empty group.
public static ActivityList ActivityList(string widgetId = "$progress") #

Empty ActivityList widget; the optional primary input is its live identity.

Parameters

widgetId string = "$progress" optional
The primary input.

Returns

ActivityList The empty ActivityList widget; the optional primary input is its live identity.
public static Align Align() #

Empty aligned container.

Returns

Align The empty aligned container.
public static BarChart BarChart(string widgetId = "bars") #

Creates a BarChart with typed fluent configuration.

Parameters

widgetId string = "bars" optional
The live identity retained by this widget.

Returns

BarChart The concrete widget, ready to configure or compose.
public static BindingOptions Binding() #

State-dependent display definition.

Returns

BindingOptions The state-dependent display definition.
public static BreadcrumbInputOptions Breadcrumb() #

Breadcrumb definition; Build delegates to AppInput.Breadcrumb.

Returns

BreadcrumbInputOptions The breadcrumb definition; Build delegates to AppInput.Breadcrumb.
public static ButtonInputOptions Button() #

Button definition; Build delegates to AppInput.Button.

Returns

ButtonInputOptions The button definition; Build delegates to AppInput.Button.
public static Calendar Calendar() #

Calendar view; configure its date, view and marks in the chain.

Returns

Calendar The calendar view; configure its date, view and marks in the chain.
public static CellMap CellMap(string widgetId = "cells") #

Empty CellMap widget; the optional primary input is its live identity.

Parameters

widgetId string = "cells" optional
The primary input.

Returns

CellMap The empty CellMap widget; the optional primary input is its live identity.
Chart 2 overloads
public static ChartOptions Chart(string title, Action<ChartOptions>? configure = null) #

Creates a chart definition with its title and, optionally, configures it.

Parameters

title string required
The title.
configure System.Action<ConsoleMonster.Widgets.ChartOptions>? = null optional
Configures the chart, or null.

Returns

ChartOptions The chart.
public static ChartOptions Chart() #

Numeric chart definition; Build delegates to Chart.Create.

Returns

ChartOptions The numeric chart definition; Build delegates to Chart.Create.
public static ChartViewInputOptions ChartView() #

An explorable chart definition; configure Key and Chart, then Build.

public static CodeView Code(string text) #

Source text with syntax highlighting, line numbers, selection and pagination.

Parameters

text string required

Returns

CodeView
public static CollapsibleInputOptions Collapsible() #

Collapsible section definition; Build delegates to AppInput.Collapsible.

Returns

CollapsibleInputOptions The collapsible section definition; Build delegates to AppInput.Collapsible.
public static ColumnFormat ColumnFormat() #

Column presentation format.

Returns

ColumnFormat The column presentation format.
public static Columns Columns() #

Empty horizontal composition.

Returns

Columns The empty horizontal composition.
public static CommandOptions Command() #

Asynchronous action definition.

Returns

CommandOptions The asynchronous action definition.
public static ConfirmPrompt ConfirmPrompt() #

Confirmation question.

Returns

ConfirmPrompt The confirmation question.
public static Dashboard Dashboard(string widgetId = "dashboard") #

Empty dashboard; configure Title and Content in the chain.

Parameters

widgetId string = "dashboard" optional
The primary input.

Returns

Dashboard The empty dashboard; configure Title and Content in the chain.
public static DashboardFrame DashboardFrame(string title = "") #

A summary frame: title line, meters, needs attention, sections, legend and footer (New-ConsoleDashboardFrame).

Parameters

title string = "" optional
The literal title, usually the view name.

Returns

DashboardFrame The empty frame.
public static DataGridInputOptions DataGrid() #

An embeddable grid definition; configure Key and Grid, then Build.

public static DatePickerInputOptions DatePicker() #

A persistent civil-date or range picker definition.

public static DatePrompt DatePrompt() #

A date or inclusive date-range question.

Returns

DatePrompt
Diagram 2 overloads
public static Diagram Diagram(string title = "") #

Starts a diagram chain using the same model as object initializers and PowerShell.

Parameters

title string = "" optional

Returns

Diagram
public static Diagram Diagram(string title, Action<Diagram>? configure = null) #

Creates a diagram with its title and, optionally, configures it.

Parameters

title string required
The title.
configure System.Action<ConsoleMonster.Widgets.Diagram>? = null optional
Configures the diagram, or null.

Returns

Diagram The diagram.
public static FormDialogOptions Dialog() #

A composed modal form definition with named field results.

public static ViewFacts Facts() #

Empty facts line; add counts, labels and semantic roles.

Returns

ViewFacts The facts line.
public static Flow Flow(string widgetId = "flow") #

Empty flow; add nodes, edges and branches in the chain.

Parameters

widgetId string = "flow" optional
The optional primary live identity.

Returns

Flow The empty flow; add nodes, edges and branches in the chain.
public static FooterBar FooterBar() #

Empty footer bar.

Returns

FooterBar The empty footer bar.
Form 2 overloads
public static Form Form() #

Empty sequential form.

Returns

Form The empty sequential form.
public static Form Form(string title, Action<Form>? configure = null) #

Creates a form with its title and, optionally, configures it.

Parameters

title string required
The title.
configure System.Action<ConsoleMonster.Interactive.Form>? = null optional
Configures the form, or null.

Returns

Form The form.
public static Grid Grid() #

Interactive record grid; configure Title and rows in the chain.

Returns

Grid The interactive record grid; configure Title and rows in the chain.
HeaderBar 2 overloads
public static HeaderBar HeaderBar(string title, Action<HeaderBar>? configure = null) #

Creates a header bar with its title and, optionally, configures it.

Parameters

title string required
The title.
configure System.Action<ConsoleMonster.Widgets.HeaderBar>? = null optional
Configures the header, or null.

Returns

HeaderBar The header.
public static HeaderBar HeaderBar() #

Empty header bar.

Returns

HeaderBar The empty header bar.
public static KeyValueList KeyValue(string widgetId = "keyvalue") #

Empty KeyValue widget; the optional primary input is its live identity.

Parameters

widgetId string = "keyvalue" optional
The primary input.

Returns

KeyValueList The empty KeyValue widget; the optional primary input is its live identity.
public static Lanes Lanes(string widgetId = "lanes") #

Empty Lanes widget; the optional primary input is its live identity.

Parameters

widgetId string = "lanes" optional
The primary input.

Returns

Lanes The empty Lanes widget; the optional primary input is its live identity.
public static LayoutGrid LayoutGrid() #

Empty layout grid; configure Columns before adding cells.

Returns

LayoutGrid The empty layout grid; configure Columns before adding cells.
public static LayoutRegions LayoutRegions() #

Swappable regions that show one active subtree at narrow widths.

public static LineChart LineChart(string widgetId = "chart") #

Creates a LineChart with typed fluent configuration.

Parameters

widgetId string = "chart" optional
The live identity retained by this widget.

Returns

LineChart The concrete widget, ready to configure or compose.
public static LogRegion LogRegion(string widgetId = "log") #

Empty LogRegion widget; the optional primary input is its live identity.

Parameters

widgetId string = "log" optional
The primary input.

Returns

LogRegion The empty LogRegion widget; the optional primary input is its live identity.
public static LogViewport LogViewport(string key = "log") #

A retained, scrollable app log with a find bar: what New-ConsoleLogRegion makes inside Show-ConsoleApp content.

Parameters

key string = "log" optional
The app-state key, also the live target Write-ConsoleLogEntry -WidgetId addresses.

Returns

LogViewport The empty viewport.
public static MarkdownView Markdown() #

Creates a composable Markdown document from semantic blocks.

Returns

MarkdownView The empty document; use ConsoleMonster.Markdown to parse Markdown source.
public static TextBlock Markup(string markup) #

Markup text, matching New-ConsoleText -Markup.

Parameters

markup string required
The markup input.

Returns

TextBlock The markup text widget.
Menu 2 overloads
public static Menu Menu() #

Empty navigation menu.

Returns

Menu The empty navigation menu.
public static Menu Menu(string title, Action<Menu>? configure = null) #

Creates a menu with its title and, optionally, configures it.

Parameters

title string required
The title.
configure System.Action<ConsoleMonster.Interactive.Menu>? = null optional
Configures the menu, or null.

Returns

Menu The menu.
public static MenuItem MenuItem() #

Empty menu action definition.

Returns

MenuItem The empty menu action definition.
public static MenuRunResult MenuRunResult() #

Menu action result.

Returns

MenuRunResult The menu action result.
public static NumberPrompt NumberPrompt() #

Numeric question.

Returns

NumberPrompt The numeric question.
public static OutlineInputOptions Outline() #

Outline definition; Build delegates to AppInput.Outline.

Returns

OutlineInputOptions The outline definition; Build delegates to AppInput.Outline.
public static Padding Padding() #

Empty padded container.

Returns

Padding The empty padded container.
Panel 2 overloads
public static Panel Panel() #

Empty panel; configure Title and Content in the chain.

Returns

Panel The empty panel; configure Title and Content in the chain.
public static Panel Panel(string title, Action<Panel>? configure = null) #

Creates a panel with its title and, optionally, configures it.

Parameters

title string required
The title.
configure System.Action<ConsoleMonster.Layout.Panel>? = null optional
Configures the panel, or null.

Returns

Panel The panel.
public static PathPrompt PathPrompt() #

Path question.

Returns

PathPrompt The path question.
public static Phases Phases(string widgetId = "phases") #

Empty Phases widget; the optional primary input is its live identity.

Parameters

widgetId string = "phases" optional
The primary input.

Returns

Phases The empty Phases widget; the optional primary input is its live identity.
public static ProgressOptions Progress() #

Progress definition; Build delegates to Progress.Create.

Returns

ProgressOptions The progress definition; Build delegates to Progress.Create.
public static ProgressBar ProgressBar(string widgetId = "progress") #

Creates a ProgressBar with typed fluent configuration.

Parameters

widgetId string = "progress" optional
The live identity retained by this widget.

Returns

ProgressBar The concrete widget, ready to configure or compose.
public static RegionWidget Region(string widgetId = "region") #

Empty Region widget; the optional primary input is its live identity.

Parameters

widgetId string = "region" optional
The primary input.

Returns

RegionWidget The empty Region widget; the optional primary input is its live identity.
public static ReviewModel Review() #

Creates an empty review model for a typed question workflow.

Returns

ReviewModel The review model.
public static RichTextBuilder RichText() #

Creates a rich-text composer.

Returns

RichTextBuilder The composer.
public static Rows Rows() #

Empty vertical composition.

Returns

Rows The empty vertical composition.
public static Rule Rule(string? title = null) #

Horizontal rule with an optional primary title.

Parameters

title string? = null optional
The primary input.

Returns

Rule The horizontal rule with an optional primary title.
public static ScrollView ScrollView() #

Empty scrolling container.

Returns

ScrollView The empty scrolling container.
public static SelectInputOptions Select() #

Selection control definition; Multiple selects the renderer at Build.

Returns

SelectInputOptions The selection control definition; Multiple selects the renderer at Build.
public static SelectQuestionOptions SelectQuestion() #

Selection question, as Read-ConsoleSelect: configure Title and choices in the chain, Multiple for several answers, and end with Show().

Returns

SelectQuestionOptions The selection question definition.
public static ShellPrompt ShellPrompt() #

A shell prompt with the same segments and layout as PowerShell's prompt feature.

public static Sparkline Sparkline(string widgetId = "sparkline") #

Creates a Sparkline with typed fluent configuration.

Parameters

widgetId string = "sparkline" optional
The live identity retained by this widget.

Returns

Sparkline The concrete widget, ready to configure or compose.
public static Spinner Spinner(string widgetId = "spinner") #

Creates a Spinner with typed fluent configuration.

Parameters

widgetId string = "spinner" optional
The live identity retained by this widget.

Returns

Spinner The concrete widget, ready to configure or compose.
public static Splitter Splitter() #

Two panes with a draggable divider.

Returns

Splitter The splitter with empty panes.
public static Stack Stack() #

Empty overlay composition.

Returns

Stack The empty overlay composition.
public static StackedBar StackedBar(string widgetId = "stacked") #

Creates a StackedBar with typed fluent configuration.

Parameters

widgetId string = "stacked" optional
The live identity retained by this widget.

Returns

StackedBar The concrete widget, ready to configure or compose.
public static StatusList StatusList(string widgetId = "status") #

Empty status list.

Parameters

widgetId string = "status" optional
The optional primary live identity.

Returns

StatusList The status list.
public static SummaryBar SummaryBar(string widgetId = "summary") #

Empty SummaryBar widget; the optional primary input is its live identity.

Parameters

widgetId string = "summary" optional
The primary input.

Returns

SummaryBar The empty SummaryBar widget; the optional primary input is its live identity.
public static TabOptions Tab() #

A retained tab-page definition.

Returns

TabOptions
Table 2 overloads
public static Table Table() #

Empty table; add columns and rows in the chain.

Returns

Table The empty table; add columns and rows in the chain.
public static Table Table(string title, Action<Table>? configure = null) #

Creates a table with its title and, optionally, configures it.

Parameters

title string required
The title.
configure System.Action<ConsoleMonster.Widgets.Table>? = null optional
Configures the table, or null.

Returns

Table The table.
public static Table<T?> Table<T>(IEnumerable<T?> items) #

A table over a primary sequence, preserving row identity and typed column selectors.

Type Parameters

T
The row type.

Parameters

items System.Collections.Generic.IEnumerable<T?> required
The primary row sequence.

Returns

Table<T?> The typed table.
public static Tabs Tabs() #

Retained tabs with keyboard and pointer navigation.

Returns

Tabs
public static TextBlock Text(string text = "") #

Literal text; use Ui.Markup(markup) for explicit markup.

Parameters

text string = "" optional
The primary input.

Returns

TextBlock The literal text; use Ui.Markup(markup) for explicit markup.
public static TextInputOptions TextInput() #

Text control definition; Multiline selects the renderer at Build.

Returns

TextInputOptions The text control definition; Multiline selects the renderer at Build.
public static TextQuestionOptions TextQuestion() #

Text question, as Read-ConsoleText: configure Title and validation in the chain, AsSecret or Multiline for the variant, and end with Show().

Returns

TextQuestionOptions The text question definition.
public static ToggleInputOptions Toggle() #

Boolean control definition; Build delegates to AppInput.Toggle.

Returns

ToggleInputOptions The boolean control definition; Build delegates to AppInput.Toggle.
Tree 2 overloads
public static Tree Tree(string title, Action<Tree>? configure = null) #

Creates a tree with its title and, optionally, configures it.

Parameters

title string required
The title.
configure System.Action<ConsoleMonster.Widgets.Tree>? = null optional
Configures the tree, or null.

Returns

Tree The tree.
public static Tree Tree() #

Empty object tree; configure Title in the chain.

Returns

Tree The empty object tree; configure Title in the chain.
public static TreeSelectInputOptions TreeSelect() #

A budgeted, lazy object-tree input definition.

public static TypedConfirmPrompt TypedConfirmPrompt() #

Typed confirmation question; configure Expected in the chain.

Returns

TypedConfirmPrompt The typed confirmation question; configure Expected in the chain.