Table of Contents

Namespace Terminal.Gui.Views

The Views namespace contains the complete collection of built-in UI controls and widgets.

Terminal.Gui.Views provides a comprehensive set of pre-built user interface controls, derived from View, that cover common application needs. From simple labels and buttons to complex data grids and tree views, this namespace contains production-ready controls with consistent behavior, theming, and accessibility support.

All Views in this namespace are built on the View foundation and inherit the complete feature set including adornments, scrolling, focus management, and user arrangement capabilities.

For a complete list of all views with examples, see the List of Views page.

Classes

AllowedType

Describes a requirement on what FileInfo can be selected. This can be combined with other IAllowedType in a FileDialog to for example show only .csv files but let user change to open any if they want.

AllowedTypeAny

IAllowedType that allows selection of any types (.).

AppendAutocomplete

Autocomplete for a TextField which shows suggestions within the box. Displayed suggestions can be completed using the tab key.

AutocompleteBase

Abstract implementation of IAutocomplete allows for tailoring how autocomplete is rendered/interacted with.

AutocompleteContext

Describes the current state of a View which is proposing autocomplete. Suggestions are based on this state.

Axis

Renders a continuous line with grid line ticks and labels

AxisIncrementToRender

A location on an axis of a GraphView that may or may not have a label associated with it

Bar

Provides a horizontally or vertically oriented container for Shortcuts to be used as a menu, toolbar, or status bar.

BarSeries

Series of bars positioned at regular intervals

BarSeriesBar

A single bar in a BarSeries

Button

A button View that can be pressed with the mouse or keyboard.

CellActivatedEventArgs

Defines the event arguments for CellActivated event

CellColorGetterArgs

Arguments for a CellColorGetterDelegate. Describes a cell for which a rendering Scheme is being sought

CellToggledEventArgs

Event args for the CellToggled event.

CharMap

A scrollable map of the Unicode codepoints.

CheckBox

Shows a checkbox that can be cycled between two or three states.

CheckBoxTableSourceWrapperBase

ITableSource for a TableView which adds a checkbox column as an additional column in the table.

CheckBoxTableSourceWrapperByIndex

Implementation of CheckBoxTableSourceWrapperBase which records toggled rows by their row number.

CheckBoxTableSourceWrapperByObject<T>

Implementation of CheckBoxTableSourceWrapperBase which records toggled rows by a property on row objects.

ColorPicker

Color Picker supporting RGB, HSL, and HSV color models. Supports choosing colors with sliders and color names from the IColorNameResolver.

ColorPicker16

A sinple color picker that supports the legacy 16 ANSI colors

ColorPickerStyle

Contains style settings for ColorPicker e.g. which ColorModel to use.

ColumnStyle

Describes how to render a given column in a TableView including Alignment and textual representation of cells (e.g. date formats) See TableView Deep Dive for more information.

ComboBox

Provides a drop-down list of items the user can select from.

ContentsChangedEventArgs

Event arguments for events for when the contents of the TextView change. E.g. the ContentsChanged event.

DataTableSource

ITableSource implementation that wraps a DataTable. This class is mutable: changes are permitted to the wrapped DataTable.

DateField

Provides date editing functionality with mouse support.

DatePicker

Lets the user pick a date from a visual calendar.

DateTimeEventArgs<T>

Defines the event arguments for DateChanged and TimeChanged events.

DefaultFileOperations

Default file operation handlers using modal dialogs.

DelegateTreeBuilder<T>

Implementation of ITreeBuilder<T> that uses user defined functions

Dialog

A Modal Window. Supports a simple API for adding Buttons across the bottom. By default, the Dialog is centered and used the Dialog scheme.

DrawTreeViewLineEventArgs<T>

Event args for the DrawLine event

EnumerableTableSource<T>

ITableSource implementation that wraps arbitrary data.

FileDialog

The base-class for OpenDialog and SaveDialog

FileDialogStyle

Stores style settings for FileDialog.

FilesSelectedEventArgs

Event args for the FilesSelected event

FlagSelector

Provides a user interface for displaying and selecting non-mutually-exclusive flags. Flags can be set from a dictionary or directly from an enum type.

FlagSelector<TEnum>

Provides a user interface for displaying and selecting non-mutually-exclusive flags. Flags can be set from a dictionary or directly from an enum type.

FrameView

A non-overlapped container for other views with a border and optional title.

GraphCellToRender

Describes how to render a single row/column of a GraphView based on the value(s) in ISeries at that location

GraphView

Displays graphs (bar, scatter, etc...) with flexible labels, scaling, and scrolling

HexView

Provides a hex editor with the left side showing the hex values of the bytes in a Stream and the right side showing the contents (filtered to printable Unicode glyphs).

HexViewEditEventArgs

Defines the event arguments for Edited event.

HexViewEventArgs

Defines the event arguments for PositionChanged event.

HistoryTextItemEventArgs

Event arguments for Terminal.Gui.Views.HistoryText item events. Used by TextField and TextView.

HorizontalAxis

The horizontal (x-axis) of a GraphView

Label

Displays text that describes the View next in the SubViews. When the user presses a hotkey that matches the HotKey of the Label, the next View in SubViews will be activated.

LegendAnnotation

Used by GraphView to render smbol definitions in a graph, e.g. colors and their meanings

Line

Draws a single line using the LineStyle specified by BorderStyle.

LineF

Describes two points in graph space and a line between them

LineView

A straight line control either horizontal or vertical

ListColumnStyle

Defines rendering options that affect how the view is displayed.

ListTableSource

ITableSource implementation that wraps a IList. This class is mutable: changes are permitted to the wrapped IList.

ListView

Provides a scrollable list of data where each item can be activated to perform an action.

ListViewItemEventArgs

EventArgs for ListView events.

ListViewRowEventArgs

EventArgs used by the RowRender event.

ListWrapper<T>

Provides a default implementation of IListDataSource that renders ListView items using ToString().

MenuBar

Provides a menu bar that spans the top of a Toplevel View with drop-down and cascading menus.

By default, any sub-sub-menus (sub-menus of the MenuItems added to MenuBarItems) are displayed in a cascading manner, where each sub-sub-menu pops out of the sub-menu frame (either to the right or left, depending on where the sub-menu is relative to the edge of the screen). By setting UseSubMenusSingleFrame to true, this behavior can be changed such that all sub-sub-menus are drawn within a single frame below the MenuBar.

MenuBarItem

MenuBarItem is a menu item on MenuBar. MenuBarItems do not support ShortcutKey.

MenuBarItemv2

A Shortcut-derived object to be used as items in a MenuBarv2. MenuBarItems hold a PopoverMenu instead of a SubMenu.

MenuBarv2

A horizontal list of MenuBarItemv2s. Each MenuBarItemv2 can have a PopoverMenu that is shown when the MenuBarItemv2 is selected.

MenuClosingEventArgs

An EventArgs which allows passing a cancelable menu closing event.

MenuItem

A MenuItem has title, an associated help text, and an action to execute on activation. MenuItems can also have a checked indicator (see Checked).

MenuItemv2

A Shortcut-derived object to be used as a menu item in a Menuv2. Has title, an A Shortcut-derived object to be used as a menu item in a Menuv2. Has title, an associated help text, and an action to execute on activation.

MenuOpenedEventArgs

Defines arguments for the MenuOpened event

MenuOpeningEventArgs

An EventArgs which allows passing a cancelable menu opening event or replacing with a new MenuBarItem.

Menuv2

A Bar-derived object to be used as a vertically-oriented menu. Each subview is a MenuItemv2.

MessageBox

MessageBox displays a modal message to the user, with a title, a message and a series of options that the user can choose from.

MultiBarSeries

Collection of BarSeries in which bars are clustered by category

NetMaskedTextProvider

.Net MaskedTextProvider Provider for TextValidateField.

Wrapper around MaskedTextProvider

Masking elements

NumericUpDown

Enables the user to increase or decrease an int by clicking on the up or down buttons.

NumericUpDown<T>

Enables the user to increase or decrease a value with the mouse or keyboard in type-safe way.

ObjectActivatedEventArgs<T>

Event args for the ObjectActivated event

OpenDialog

Provides an interactive Dialog for selecting files or directories for opening

OptionSelector

Provides a user interface for displaying and selecting a single item from a list of options. Each option is represented by a checkbox, but only one can be selected at a time.

PathAnnotation

Sequence of lines to connect points e.g. of a ScatterSeries

PopoverMenu

Provides a cascading menu that pops over all other content. Can be used as a context menu or a drop-down all other content. Can be used as a context menu or a drop-down menu as part of MenuBarv2 as part of MenuBarv2.

PopupAutocomplete

Renders an overlay on another view at a given point that allows selecting from a range of 'autocomplete' options.

ProgressBar

A Progress Bar view that can indicate progress of an activity visually.

RadioGroup

Displays a list of mutually-exclusive items. Each items can have its own hotkey.

ReadOnlyCollectionExtensions

Extends IReadOnlyCollection<T> with methods to find the index of an element.

RowColorGetterArgs

Arguments for RowColorGetterDelegate. Describes a row of data in a ITableSource for which Scheme is sought.

SaveDialog

Provides an interactive Dialog for selecting files or directories for saving

ScatterSeries

Series composed of any number of discrete data points

ScrollBar

Indicates the size of scrollable content and controls the position of the visible content, either vertically or horizontally. Two Buttons are provided, one to scroll up or left and one to scroll down or right. Between the buttons is a ScrollSlider that can be dragged to control the position of the visible content. The ScrollSlier is sized to show the proportion of the scrollable content to the size of the Viewport.

ScrollSlider

Represents the proportion of the visible content to the Viewport in a ScrollBar. Can be dragged with the mouse, constrained by the size of the Viewport of it's superview. Can be oriented either vertically or horizontally.

SelectedCellChangedEventArgs

Defines the event arguments for SelectedCellChanged

SelectedItemChangedArgs

Event arguments for the SelectedItemChanged event.

SelectionChangedEventArgs<T>

Event arguments describing a change in selected object in a tree view

Shortcut

Displays a command, help text, and a key binding. When the key specified by Key is pressed, the command will be invoked. Useful for displaying a command in Bar such as a menu, toolbar, or status bar.

SingleWordSuggestionGenerator

ISuggestionGenerator which suggests from a collection of words those that match the AutocompleteContext. You can update AllSuggestions at any time to change candidates considered for autocomplete.

Slider

Provides a slider control letting the user navigate from a set of typed options in a linear manner using the keyboard or mouse.

SliderAttributes

Slider<T> Legend Style

SliderEventArgs<T>

EventArgs for Slider<T> events.

SliderOptionEventArgs

EventArgs for Slider<T> SliderOption<T> events.

SliderOption<T>

Represents an option in a Slider<T> .

SliderStyle

Slider<T> Style

Slider<T>

Provides a tpe-safe slider control letting the user navigate from a set of typed options in a linear manner using the keyboard or mouse.

SpinnerStyle

SpinnerStyles used in a SpinnerView.

SpinnerStyle.Aesthetic
SpinnerStyle.Aesthetic2
SpinnerStyle.Arc
SpinnerStyle.Arrow
SpinnerStyle.Arrow2
SpinnerStyle.Arrow3
SpinnerStyle.Balloon
SpinnerStyle.Balloon2
SpinnerStyle.BetaWave
SpinnerStyle.BluePulse
SpinnerStyle.Bounce
SpinnerStyle.BouncingBall
SpinnerStyle.BouncingBar
SpinnerStyle.BoxBounce
SpinnerStyle.BoxBounce2
SpinnerStyle.Christmas
SpinnerStyle.Circle
SpinnerStyle.CircleHalves
SpinnerStyle.CircleQuarters
SpinnerStyle.Clock
SpinnerStyle.Custom
SpinnerStyle.Dots
SpinnerStyle.Dots10
SpinnerStyle.Dots11
SpinnerStyle.Dots12
SpinnerStyle.Dots2
SpinnerStyle.Dots3
SpinnerStyle.Dots4
SpinnerStyle.Dots5
SpinnerStyle.Dots6
SpinnerStyle.Dots7
SpinnerStyle.Dots8
SpinnerStyle.Dots8Bit
SpinnerStyle.Dots9
SpinnerStyle.Dqpb
SpinnerStyle.Earth
SpinnerStyle.FingerDance
SpinnerStyle.FistBump
SpinnerStyle.Flip
SpinnerStyle.Grenade
SpinnerStyle.GrowHorizontal
SpinnerStyle.GrowVertical
SpinnerStyle.Hamburger
SpinnerStyle.Hearts
SpinnerStyle.Layer
SpinnerStyle.Line
SpinnerStyle.Line2
SpinnerStyle.Material
SpinnerStyle.MindBlown
SpinnerStyle.Monkey
SpinnerStyle.Moon
SpinnerStyle.Noise
SpinnerStyle.OrangeBluePulse
SpinnerStyle.OrangePulse
SpinnerStyle.Pipe
SpinnerStyle.Points
SpinnerStyle.Pong
SpinnerStyle.Runner
SpinnerStyle.Shark
SpinnerStyle.SimpleDots
SpinnerStyle.SimpleDotsScrolling
SpinnerStyle.Smiley
SpinnerStyle.SoccerHeader
SpinnerStyle.Speaker
SpinnerStyle.SquareCorners
SpinnerStyle.Squish
SpinnerStyle.Star
SpinnerStyle.Star2
SpinnerStyle.TimeTravelClock
SpinnerStyle.Toggle
SpinnerStyle.Toggle10
SpinnerStyle.Toggle11
SpinnerStyle.Toggle12
SpinnerStyle.Toggle13
SpinnerStyle.Toggle2
SpinnerStyle.Toggle3
SpinnerStyle.Toggle4
SpinnerStyle.Toggle5
SpinnerStyle.Toggle6
SpinnerStyle.Toggle7
SpinnerStyle.Toggle8
SpinnerStyle.Toggle9
SpinnerStyle.Triangle
SpinnerStyle.Weather
SpinnerView

Displays a spinning glyph or combinations of glyphs to indicate progress or activity

SplitterEventArgs

Provides data for TileView events.

StatusBar

A status bar is a View that snaps to the bottom of a Toplevel displaying set of Shortcuts. The StatusBar should be context sensitive. This means, if the main menu and an open text editor are visible, the items probably shown will be ~F1~ Help ~F2~ Save ~F3~ Load. While a dialog to ask a file to load is executed, the remaining commands will probably be ~F1~ Help. So for each context must be a new instance of a status bar.

StepChangeEventArgs

EventArgs for WizardStep events.

Suggestion

A replacement suggestion made by IAutocomplete

Tab

A single tab in a TabView.

TabChangedEventArgs

Describes a change in SelectedTab

TabMouseEventArgs

Describes a mouse event over a specific Tab in a TabView.

TabStyle

Describes render stylistic selections of a TabView

TabView

Control that hosts multiple sub views, presenting a single one at once.

TableSelection

Describes a selected region of the table

TableStyle

Defines rendering options that affect how the table is displayed. See TableView Deep Dive for more information.

TableView

Displays and enables infinite scrolling through tabular data based on a ITableSource. See the TableView Deep Dive for more.

TextAnnotation

Displays text at a given position (in screen space or graph space)

TextField

Single-line text editor.

TextFieldAutocomplete

Renders an overlay on another view at a given point that allows selecting from a range of 'autocomplete' options. An implementation on a TextField.

TextRegexProvider

Regex Provider for TextValidateField.

TextValidateField

Masked text editor that validates input through a ITextValidateProvider

TextView

Fully featured multi-line text editor

TextViewAutocomplete

Renders an overlay on another view at a given point that allows selecting from a range of 'autocomplete' options. An implementation on a TextView.

Tile

A single ContentView presented in a TileView. To create new instances use RebuildForTileCount(int) or InsertTile(int).

TileView

A View consisting of a moveable bar that divides the display area into resizeable Tiles.

TimeField

Provides time editing functionality with mouse support

Toplevel

Toplevel views are used for both an application's main view (filling the entire screen and for modal (pop-up) views such as Dialog, MessageBox, and Wizard).

ToplevelClosingEventArgs

EventArgs implementation for the Closing event.

ToplevelEqualityComparer

Implements the IEqualityComparer<T> for comparing two Toplevels used by StackExtensions.

ToplevelEventArgs

Args for events that relate to a specific Toplevel.

TreeBuilder<T>

Abstract implementation of ITreeBuilder<T>.

TreeNode

Simple class for representing nodes, use with regular (non-generic) TreeView.

TreeNodeBuilder

ITreeBuilder<T> implementation for ITreeNode objects

TreeStyle

Defines rendering options that affect how the tree is displayed.

TreeTableSource<T>

An ITableSource with expandable rows.

TreeView

Convenience implementation of generic TreeView<T> for any tree were all nodes implement ITreeNode. See TreeView Deep Dive for more information.

TreeViewTextFilter<T>

ITreeViewFilter<T> implementation which searches the AspectGetter of the model for the given Text.

TreeView<T>

Hierarchical tree view with expandable branches. Branch objects are dynamically determined when expanded using a user defined ITreeBuilder<T>. See TreeView Deep Dive for more information.

UnicodeRange

Represents all of the Uniicode ranges.from System.Text.Unicode.UnicodeRange plus the non-BMP ranges not included.

VerticalAxis

The vertical (i.e. Y axis) of a GraphView

Window

An overlapped container for other views with a border and optional title.

Wizard

Provides navigation and a user interface (UI) to collect related data across multiple steps. Each step ( WizardStep) can host arbitrary Views, much like a Dialog. Each step also has a pane for help text. Along the bottom of the Wizard view are customizable buttons enabling the user to navigate forward and backward through the Wizard.

WizardButtonEventArgs

EventArgs for WizardStep transition events.

WizardStep

Represents a basic step that is displayed in a Wizard. The WizardStep view is divided horizontally in two. On the left is the content view where Views can be added, On the right is the help for the step. Set HelpText to set the help text. If the help text is empty the help pane will not be shown. If there are no Views added to the WizardStep the HelpText (if not empty) will fill the wizard step.

Interfaces

IAllowedType

Interface for FileDialog restrictions on which file type(s) the user is allowed to select/enter.

IAnnotation

Describes an overlay element that is rendered either before or after a series.

Annotations can be positioned either in screen space (e.g. a legend) or in graph space (e.g. a line showing high point)

Unlike ISeries, annotations are allowed to draw into graph margins

IAutocomplete

Renders an overlay on another view at a given point that allows selecting from a range of 'autocomplete' options.

ICollectionNavigator

Navigates a collection of items using keystrokes. The keystrokes are used to build a search string. The SearchString is used to find the next item in the collection that matches the search string when GetNextMatchingItem(int, char) is called.

If the user types keystrokes that can't be found in the collection, the search string is cleared and the next item is found that starts with the last keystroke.

If the user pauses keystrokes for a short time (see TypingDelay), the search string is cleared.

ICollectionNavigatorMatcher

Determines which keys trigger collection manager navigation and how to match typed strings to objects in the collection. Default implementation is Terminal.Gui.Views.DefaultCollectionNavigatorMatcher.

IEnumerableTableSource<T>

Interface for all ITableSource which present an object per row (of type T ).

IListCollectionNavigator

ICollectionNavigator sub-interface for ListView and TreeView. See also ListView / TreeView

IListDataSource

Implement IListDataSource to provide custom rendering for a ListView.

ISeries

Describes a series of data that can be rendered into a GraphView>

ISuggestionGenerator

Generates autocomplete Suggestion based on a given cursor location within a string

ITableSource

Tabular matrix of data to be displayed in a TableView.

ITextValidateProvider

TextValidateField Providers Interface. All TextValidateField are created with a ITextValidateProvider.

ITreeBuilder<T>

Interface for supplying data to a TreeView<T> on demand as root level nodes are expanded by the user

ITreeNode

Interface to implement when you want the regular (non-generic) TreeView to automatically determine children for your class (without having to specify an ITreeBuilder<T>)

ITreeView

Interface for all non-generic members of TreeView<T>. See TreeView Deep Dive for more information.

ITreeViewFilter<T>

Provides filtering for a TreeView.

Enums

CheckState

Represents the state of a CheckBox.

FlagSelectorStyles

Styles for FlagSelector.

MenuItemCheckStyle

Specifies how a MenuItem shows selection state.

OpenMode

Determine which System.IO type to open.

ProgressBarFormat

Specifies the format that a ProgressBar uses to indicate the visual presentation.

ProgressBarStyle

Specifies the style that a ProgressBar uses to indicate the progress of an operation.

SliderType

Slider<T> Types

Delegates

AspectGetterDelegate<T>

Delegates of this type are used to fetch string representations of user's model objects

CellColorGetterDelegate

Delegate for providing color to TableView cells based on the value being rendered

LabelGetterDelegate

Delegate for custom formatting of axis labels. Determines what should be displayed at a given label

RowColorGetterDelegate

Delegate for providing color for a whole row of a TableView

SplitterEventHandler

Represents a method that will handle splitter events.