(#1279) added the missing columns-cast

This commit is contained in:
Nils Andresen
2023-09-11 23:26:54 +02:00
parent 131b37fff8
commit c64797d681
3 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,22 @@
using System.Threading;
using Spectre.Console;
namespace Generator.Commands.Samples
{
public class ColumnsSample : BaseSample
{
public override void Run(IAnsiConsole console)
{
for (var i = 0; i <= 10; i++)
{
var n = 3 * i + 1;
console.Write(new Columns(
new Text($"Item {n}", new Style(Color.Red, Color.Black)),
new Text($"Item {n+1}", new Style(Color.Green, Color.Black)),
new Text($"Item {n+2}", new Style(Color.Blue, Color.Black))
));
Thread.Sleep(200);
}
}
}
}