Skip to content

Rendering markup and IRenderables to/inside strings #1306

Answered by patriksvensson
perrylets asked this question in Q&A
Discussion options

You must be logged in to vote

The easiest way to do this is to use a Grid:

AnsiConsole.Write(
    new Grid()
        .AddColumn(new GridColumn().PadRight(1))
        .AddColumn()
        .AddRow(
            new Markup("[yellow]Directory[/]:"),
            new TextPath("C:/temp/lol.txt")
        ));

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@perrylets
Comment options

@patriksvensson
Comment options

Answer selected by patriksvensson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants