Uploaded February 2020 | Updated November 2026, 3 hours ago
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 `Window`s, `Button`s, `ListView`s or `Label`s. 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:
```csharp
Application.Init ();
var top = Application.Top;
var label = new Label("Hello, Gui.cs!");
top.Add(label);
Application.Run();
```
The Gui.cs source code is available on GitHub here: github.com/migueldeicaza/gui.cs
GUI.CS is available on Nuget: nuget.org/packages/Terminal.Gui
More information about String Interpolation and Formatting: docs.microsoft.com/en-us/dotnet/standard/base-types/composite-formatting#format-string-component
Join the World of Zero Discord Server: discord.gg/hU5Kq2u
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 `Window`s, `Button`s, `ListView`s or `Label`s. 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:
```csharp
Application.Init ();
var top = Application.Top;
var label = new Label("Hello, Gui.cs!");
top.Add(label);
Application.Run();
```
The Gui.cs source code is available on GitHub here: github.com/migueldeicaza/gui.cs
GUI.CS is available on Nuget: nuget.org/packages/Terminal.Gui
More information about String Interpolation and Formatting: docs.microsoft.com/en-us/dotnet/standard/base-types/composite-formatting#format-string-component
Join the World of Zero Discord Server: discord.gg/hU5Kq2u


The end result of this is will allow us to tweak the radius, location, inside and outside color of the circle we draw in world space. This allows us to do a lot more than we could previously even though we havent really added that many new features. We also migrate to use an unlit shader instead of using the default PBR shader. This is new compared to our original surface shader and is closer to the end result were trying to build. An unlit shader ignores lighting in the scene including things like global illumination and allows us to get a single consistent color across the entire surface our shaders material is applied to.
The World of Zero Discord Server: https://discord.gg/hU5Kq2u Using Properties and Steps in Part 2 of our Ripple in Shader Graph](https://i.ytimg.com/vi/tL3GbBAqF3E/mqdefault.jpg)





![Exploring Top-Level Programs in C# 9
Top-Level Programs is a new feature being introduced in C# 9.0 that significantly simplifies certain C# programs and allows you to remove almost all of the boilerplate code from them. This pattern allows you to call functions at the top-level of your C# program meaning that you do not need a class or function definition in order to call those functions. Instead C# automatically generates that code for you when your code is compiled.
The simplest top-level program is just one line:
```csharp
System.Console.WriteLine(Hello, World of Zero!);
```
There are a few special features included with top-level programs that help you to fully use some of the features like accepting command line arguments or async functions.
### `args` variable
C#s top-level programs include a magic `args` variable which contains a `string[]` of command-line arguments provided. Here is a working example script that accepts a command line argument to greet you by name.
```csharp
using System;
// If there is 1 argument greet that argument by name
if (args.Length 1)
{
Console.WriteLine($Hello, {args[0]}!);
} else { // Otherwise greet a generic Internet 🤖
Console.WriteLine(Hello Internet!);
}
```
Use `dotnet run World of Zero` or similar to run this code and be greeted with Hello, World of Zero!
### `async` and `await` support
You may take advantage of async functions inside of a top-level program. This allows for things like async file operations, web requests etc to be made without having to wrap them in a separate async function.
For example this task will print two numbers with a short pause between them.
```csharp
using System;
using System.Threading.Tasks;
Console.WriteLine(One);
await Task.Delay(1000);
Console.WriteLine(Two);
```
***
More info about some of the new features in C# 9.0 and how to use them is available here: https://devblogs.microsoft.com/dotnet/welcome-to-c-9-0/
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Exploring Top-Level Programs in C# 9](https://i.ytimg.com/vi/uxxROAx6MMU/mqdefault.jpg)
![Installing Nyancat using the .NET CLI
The .NET CLI includes the ability to install additional developer tools like powershell. This is a powerful feature that enables you to add tools to your developer environment without leaving your terminal. In this video well take full advantage of the feature by installing an animated nyancat tool. My productivity will never been the same!
To learn more run `dotnet tool help`.
You may use `dotnet tool install [PACKAGE_NAME]` and dotnet tool uninstall `[PACKAGE_NAME]` to install and uninstall packages.
The tool uses the same Nuget package manager that provides your dotnet libraries and chocolatey packages.
You can explore the available tools on [ToolGet](https://www.toolget.net/).
More information about managing dotnet tools: https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Installing Nyancat using the .NET CLI](https://i.ytimg.com/vi/uzaFeSxM32k/mqdefault.jpg)

