Table of Contents

Class Bar

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

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

public class Bar : View, IDisposable, ISupportInitializeNotification, ISupportInitialize, IOrientation, IDesignable
Inheritance
Bar
Implements
Derived
Inherited Members

Remarks

Any View can be added to a Bar. However, the Bar is designed to work with Shortcut objects. The Shortcut class provides a way to display a command, help, and key and align them in a specific order.

Constructors

Bar()

Initializes a new instance of View.

Bar(IEnumerable<Shortcut>?)

Properties

AlignmentModes

Gets or sets the AlignmentModes for this Bar. The default is StartToEnd.

Orientation

Gets or sets the Orientation for this Bar. The default is Horizontal.

Methods

AddShortcutAt(int, Shortcut)

Inserts a Shortcut in the specified index of Subviews.

EnableForDesign()

Causes the View to enable design-time mode. This typically means that the view will load demo data and be configured to allow for design-time manipulation.

EndInit()

Signals the View that initialization is ending. See ISupportInitialize.

OnOrientationChanged(Orientation)

Called when Orientation has changed.

OnSubviewLayout(LayoutEventArgs)

Called from Terminal.Gui.View.LayoutSubviews() before any subviews have been laid out.

RemoveShortcut(int)

Removes a Shortcut at specified index of Subviews.

SetBorderStyle(LineStyle)

Sets the BorderStyle of the view to the specified value.

Events

OrientationChanged

Raised when Orientation has changed.

OrientationChanging

Raised when Orientation is changing. Can be cancelled.