Table of Contents

Class Dialog

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

The DialogView is a Window that by default is centered and contains one or more Buttons. It defaults to the Colors.ColorSchemes ["Dialog"] color scheme and has a 1 cell padding around the edges.

public class Dialog : Window, IDisposable, ISupportInitializeNotification, ISupportInitialize
Inheritance
Dialog
Implements
Derived
Inherited Members

Remarks

To run the Dialog modally, create the Dialog, and pass it to Run(Toplevel, Func<Exception, bool>?). This will execute the dialog until it terminates via the QuitKey (Esc by default), or when one of the views or buttons added to the dialog calls RequestStop(Toplevel?).

Constructors

Dialog()

Initializes a new instance of the Dialog class with no Buttons.

Properties

ButtonAlignment

Determines how the DialogButtons are aligned along the bottom of the dialog.

ButtonAlignmentModes

Gets or sets the alignment modes for the dialog's buttons.

Buttons

Optional buttons to lay out at the bottom of the dialog.

Canceled

Gets a value indicating whether the Dialog was canceled.

DefaultBorderStyle

Defines the default border styling for Dialog. Can be configured via ConfigurationManager.

DefaultButtonAlignment

The default Alignment for Dialog.

DefaultButtonAlignmentModes

The default AlignmentModes for Dialog.

DefaultMinimumHeight

Defines the default minimum Dialog height, as a percentage of the container width. Can be configured via ConfigurationManager.

DefaultMinimumWidth

Defines the default minimum Dialog width, as a percentage of the container width. Can be configured via ConfigurationManager.

DefaultShadow

Gets or sets whether all Windows are shown with a shadow effect by default.

Methods

AddButton(Button)

Adds a Button to the Dialog, its layout will be controlled by the Dialog

GetFocusColor()

Determines the current ColorScheme based on the Enabled value.

GetNormalColor()

Determines the current ColorScheme based on the Enabled value.