This page looks best with JavaScript enabled

Exploring Gui.cs - Custom Terminal UI's in .NET

 ·   ·  ☕ 2 min read

Gui.cs is a library put together by Miguel de Icaza that allows you to compose complex Terminal UI’s using a collection of View components such as Windows, Buttons, ListViews or Labels. This allows you to create relatively complicated UI interfaces without having to manually handle some of the rendering requirements that entails. In this video I’d like to explore it as a first time user and see what possibilities it creates for us.

We’ll explore a number of things including:

  • How to create and size an application Window.
  • How to parent objects to one another so components may be nested within one another.
  • How to create lists of objects.
  • How to create a custom list container for computed sets of items (we’ll create an infinite list of integers) using the IListDataSource interface.

Because this is my first time seeing this library we’ll also see what some of the stumbling blocks might be and what the solution to them is. Let’s explore Gui.cs together and see what we can make!

A simple example script to render a basic text label looks like this:

Application.Init ();
var top = Application.Top;
var label = new Label("Hello, Gui.cs!");


The Gui.cs source code is available on GitHub here:

GUI.CS is available on Nuget:

More information about String Interpolation and Formatting:

Join the World of Zero Discord Server:

Sam Wronski
Sam Wronski
Maker of things and professional software engineer. Lets make something awesome together!