Layout

Use Layout to layout widgets in the terminal.

Usage

// Create the layout
var layout = new Layout("Root")
    .SplitColumns(
        new Layout("Left"),
        new Layout("Right")
            .SplitRows(
                new Layout("Top"),
                new Layout("Bottom")));

// Update the left column
layout["Left"].Update(
    new Panel(
        Align.Center(
            new Markup("Hello [blue]World![/]"),
            VerticalAlignment.Middle))
        .Expand());

// Render the layout
AnsiConsole.Write(layout);

Setting minimum size

layout["Left"].MinimumSize(10);

Setting ratio

layout["Left"].Ratio(2);

Settings explicit size

layout["Left"].Size(32);

Hide layout

layout["Left"].Invisible();

Show layout

layout["Left"].Visible();

References