TerminalGuiDesigner 1.0.12

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global TerminalGuiDesigner --version 1.0.12
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local TerminalGuiDesigner --version 1.0.12
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=TerminalGuiDesigner&version=1.0.12
nuke :add-package TerminalGuiDesigner --version 1.0.12

Terminal Gui Designer

example workflow NuGet Badge Code Coverage

Cross platform designer for Terminal.Gui applications.

Built with CodeDom and Roslyn, TerminalGuiDesigner lets you create complicated Views with drag and drop just like the WinForms designer you know and love (or hate).

Install the tool from NuGet or follow the Hello World Tutorial:

dotnet tool install --global TerminalGuiDesigner

Update to the latest version using

dotnet tool update --global TerminalGuiDesigner

This project is in alpha. See the feature list for progress.

designer

Building


Build using the dotnet 6.0 sdk

cd src
dotnet run

Usage


Install the dotnet sdk and create a new console application with references to Terminal.Gui. Install the TerminalGuiDesigner and create a new dialog:

dotnet new console -n hello
cd hello
dotnet add package Terminal.Gui
dotnet tool install --global TerminalGuiDesigner
TerminalGuiDesigner MyDialog.cs

Enter a namespace then add a Button to the view. Save with Ctrl+S. Exit the designer with Ctrl+Q.

Enter the following into Program.cs

using Terminal.Gui;

Application.Init();

Application.Run(new YourNamespace.MyDialog());

Application.Shutdown();

Run your program with dotnet run

You can add new code to MyDialog.cs but avoid making any changes to MyDialog.Designer.cs as this will be rewritten when saving.

For example in MyDialog.cs after InitializeComponent() add the following:

button1.Clicked += ()=>MessageBox.Query("Hello","Hello World","Ok");

Now when run clicking the button will trigger a message box.

msgbox

You can re-open the designer by running it from the command line with the file you want to edit/create.

TerminalGuiDesigner MyDialog.cs

You can remove the tool using the following:

dotnet tool uninstall --global TerminalGuiDesigner

Keybindings & Controls


You can change keybindings by copying Keys.yaml into your current directory.

To edit MenuBar items use the following controls

Key Action
Shift Up/Down Move selected menu item up/down
Shift Right Move selected menu item to a submenu of the one above
Shift Left Move selected sub menu item up a level
Del Remove selected menu item
Enter Add a new menu item
Typing Edit the Title of the selected item

New root level menus can be added by right clicking the MenuBar and selecting 'Add Menu'.

Currently there is no support for custom field naming (i.e. (Name)) or assigning shortcuts to menu items but this is planned for the future.

Features


The following feature list shows the current capabilities and the roadmap

  • Design classes
    • Window
    • Dialog
    • View
    • Top level (with statusbar and or menu)
  • Configure root properties (e.g. Window.Width, Title etc)
  • Configure subview properties
    • (Name)
    • X/Y
    • Width/Height
    • Text
    • Color Schemes
  • Mouse Input
    • Drag to move
    • Drag into/out of sub view
    • Drag to resize
  • Undo/Redo
  • Direct editing of Text just by typing
  • Easy Menu Bar Designing
    • Create new items
    • Move items
    • Move in/out of submenus
    • Add menu bar separators (Type '---')
    • Assign shortcuts
    • Set fieldnames (Name)
  • Easy Status Bar Designing
  • Create Events e.g. MyButton_OnClick
  • Mutli select
    • Multi delete
    • Multi keyboard move
    • Multi mouse drag move
    • Multi set Property
    • Multi Copy/Paste
  • Copy/Paste
    • Single simple views
    • Complex Views (TableView, MenuBar etc)
    • To OS clipboard (e.g. open one Designer.cs View and copy to another)
  • Move views to subviews
    • With mouse
    • With keyboard
  • Read and present xmldoc comments when editing properties
  • Dev Environment Integration
    • Visual Studio plugin (e.g. right click a .Designer.cs to open in TerminalGuiDesigner console)
    • Visual Studio Code plugin
  • Comprehensive Tests
  • CI
  • Create and edit views
    • Button
    • Checkbox
    • ComboBox
    • DateField
    • FrameView
    • GraphView
    • HexView
    • Label
    • LineView
    • ListView
    • MenuBar
    • PanelView
    • ProgressBar
    • RadioGroup
    • StatusBar
    • TableView
    • TabView
    • TextField
    • TextValidateField
    • TextView
    • TimeField
    • TreeView
    • View

Class Diagram


Terminal.Gui Class Diagram

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.1.0 1,621 12/2/2023
1.1.0-rc1 202 12/1/2023
1.0.25 814 9/8/2023
1.0.24 1,558 4/7/2023
1.0.23 2,863 2/6/2023
1.0.22 508 1/24/2023
1.0.21 394 1/24/2023
1.0.20 648 11/21/2022
1.0.19 435 11/13/2022
1.0.18 880 8/29/2022
1.0.17 992 8/3/2022
1.0.16 783 7/25/2022
1.0.15 897 7/2/2022
1.0.14 644 6/29/2022
1.0.13 682 6/22/2022
1.0.12 591 6/18/2022
1.0.11 663 6/18/2022
1.0.10 635 6/11/2022
1.0.9 721 5/25/2022
1.0.8 689 5/17/2022
1.0.7 652 5/8/2022
1.0.6 654 4/24/2022
1.0.5 681 4/21/2022
1.0.4 604 4/19/2022
1.0.3 609 4/12/2022
1.0.1 608 4/8/2022
1.0.0 697 4/5/2022

v1.0.12
    * Fixed bug multi selections including tab views
   v1.0.11
    * Multi select support for delete and keyboard move
    * Prevent Copy/Paste on root view
    * Prevent changing Height on Buttons
    * Added nuget icon
   v1.0.10
    * Support for setting shortcuts in menus (defaults to Ctrl+T)
    * Support for renaming menu items (defaults to Ctrl+R)
    * Delete added to view context menu
    * Blank values in Pos/Dim editor (e.g. Margin size) are now treated as 0
   v1.0.9
    * Support for adding menu separators by typing '---'
    * Prevent deleting when another view has a RelativeTo specified on it
    * Warn when overwritting a file when creating a new View
    * Replaced generic code comments in files generated to indicate the tool and version used
    * Added copy and paste of single views
    * Support for dragging a control into a seperate container (e.g. into a tab view)
    * Prevent illegal field `(Name)` values being entered
    * Fixed bad code being generated if multiple tables/tab views had columns/tabs with the same name
   v1.0.8
    * Fixed bug free typing new titles for checkboxes
    * Fixed bug free typing new titles dropping last character typed
    * Added keybinding (defaults to Enter) for opening context menu
    * Changed context menu title from 'Properties' to the fieldname of the control being edited
   v1.0.7
    * Support for editing MenuBars
   v1.0.6
    * Fixed bug adding Views to newly created TabViews
    * Fixed undo for operations performed via context menus
    * Added Try/Catch to context menu operations
    * Added support for TreeView
    * Changed TableView example data to be all nulls
v1.0.5
* Right click context menu support
* Increased mouse resizing click hit box
* Added progress indicator for creating new Views
* Fixed mouse dragging/resizing of views in subviews (e.g. TabViews)