Table of Contents

Class Window

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

A ToplevelView that draws a border around its Frame with a Title at the top.

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

Remarks

The 'client area' of a Window is a rectangle deflated by one or more rows/columns from Bounds. A this time there is no API to determine this rectangle.

Constructors

Window()

Initializes a new instance of the Window class using Computed positioning.

Window(ustring)

Initializes a new instance of the Window class with an optional title using Computed positioning.

Window(ustring, int, Border)

Initializes a new instance of the Window using Computed positioning, and an optional title.

Window(Rect, ustring)

Initializes a new instance of the Window class with an optional title using Absolute positioning.

Window(Rect, ustring, int, Border)

Initializes a new instance of the Window using Absolute positioning with the specified frame for its location, with the specified frame padding, and an optional title.

Properties

Border
Text

The text displayed by the Label.

TextAlignment

Controls the text-alignment property of the label, changing it will redisplay the Label.

Title

The title to be displayed for this window.

Methods

Add(View)

Adds a subview (child) to this view.

OnCanFocusChanged()

Method invoked when the CanFocus property from a view is changed.

OnTitleChanged(ustring, ustring)

Called when the Title has been changed. Invokes the TitleChanged event.

OnTitleChanging(ustring, ustring)

Called before the Title changes. Invokes the TitleChanging event, which can be cancelled.

Redraw(Rect)

Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.

Remove(View)

Removes a subview added via Add(View) or Add(params View[]) from this View.

RemoveAll()

Removes all subviews (children) added via Add(View) or Add(params View[]) from this View.

Events

TitleChanged

Event fired after the Title has been changed.

TitleChanging

Event fired when the Title is changing. Set Cancel to true to cancel the Title change.