docfx/docs/getting-started.md
Paste these commands into your favorite terminal on Windows, Mac, or Linux. This will install the Terminal.Gui.Templates, create a new "Hello World" TUI app, and run it.
(Press Esc to exit the app)
dotnet new install [email protected].*
dotnet new tui-simple -n myproj
cd myproj
dotnet run
To install Terminal.Gui from Nuget into a .NET Core project, use the dotnet CLI tool with this command.
dotnet add package Terminal.Gui
Use the Terminal.Gui.Templates:
dotnet new install [email protected].*
The following example shows a basic Terminal.Gui application using the modern instance-based model (this is ./Example/Example.cs):
[!code-csharpProgram.cs]
Run<T>()app.Run<ExampleWindow>() to run a window that implements xref:Terminal.Gui.App.IRunnableapp.Dispose() to clean up resources and restore the terminalAccept evente.Handled = true in event handlers to prevent further processingWhen run the application looks as follows:
dotnet build in the root directory). Run UICatalog with dotnet run --project UICatalog.Terminal.sln with Visual Studio 202x.