Table of Contents

Class PromptExtensions

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

Extension methods for prompting users with views in modal dialogs.

public static class PromptExtensions
Inheritance
PromptExtensions
Inherited Members

Remarks

These extensions provide convenient ways to show any View in a modal dialog with Ok/Cancel buttons and get a typed result.

Two API styles are provided:

For detailed usage patterns, customization options, and PowerShell examples, see the Prompt Deep Dive.

Methods

Prompt<TView>(IApplication, TView)

Shows a view in a modal dialog with Ok/Cancel buttons. For scripting languages.

Prompt<TView, TResult>(IRunnable, TView?, Func<TView, TResult?>?, TResult?, Action<Prompt<TView, TResult>>?)

Shows a view in a modal dialog with Ok/Cancel buttons and extracts a typed result.