Panel

A renderable panel.

A renderable panel.

Constructors

public Panel(string text)

Initializes a new instance of the Panel class.

Parameters:

text (string)
The panel content.
public Panel(IRenderable content)

Initializes a new instance of the Panel class.

Parameters:

content (IRenderable)
The panel content.

Properties

Border : BoxBorder

Gets or sets the box.

Expand : bool

Gets or sets a value indicating whether or not the panel should fit the available space. If false, the panel width will be auto calculated. Defaults to false.

Header : PanelHeader

Gets or sets the header.

Height : int?

Gets or sets the height of the panel.

Padding : Padding?

Gets or sets the padding.

UseSafeBorder : bool

Gets or sets a value indicating whether or not to use a "safe" border on legacy consoles that might not be able to render non-ASCII characters.

Width : int?

Gets or sets the width of the panel.

Extension Methods

Panel Header(this Panel panel, PanelHeader header)

Sets the panel header.

Returns:

The same instance so that multiple calls can be chained.

Panel Header(this Panel panel, string text, Justify? alignment)

Sets the panel header.

Returns:

The same instance so that multiple calls can be chained.

Panel HeaderAlignment(this Panel panel, Justify alignment)

Sets the panel header alignment.

Returns:

The same instance so that multiple calls can be chained.