Table of Contents

Class DialogTemplate

Namespace
SharpConsoleUI.Builders
Assembly
SharpConsoleUI.dll

A window template for creating modal dialog windows with standard dialog behavior. Dialogs are centered, modal, and non-resizable by default.

public sealed class DialogTemplate : WindowTemplate
Inheritance
DialogTemplate
Inherited Members

Constructors

DialogTemplate(string, int, int)

Initializes a new instance of the DialogTemplate class.

public DialogTemplate(string title, int width = 50, int height = 15)

Parameters

title string

The title text to display in the dialog's title bar.

width int

The width of the dialog in characters. Defaults to 50.

height int

The height of the dialog in characters. Defaults to 15.

Exceptions

ArgumentNullException

Thrown when title is null.

Methods

Configure(WindowBuilder)

Configures the window builder with dialog-specific settings including modal mode, centered position, and disabled resizing.

public override WindowBuilder Configure(WindowBuilder builder)

Parameters

builder WindowBuilder

The window builder to configure.

Returns

WindowBuilder

The configured builder instance for continued method chaining.