Skip to content
On this page

Column

  • The Column element is a multi-element container. You can put any set of elements you want.
  • The algorithm places element one underneath another. Each element may take the entire width.
  • This container renders its elements on multiple pages when necessary.
csharp
.Column(column =>
{
    column.Item().Background(Colors.Grey.Medium).Height(50);
    column.Item().Background(Colors.Grey.Lighten1).Height(100);
    column.Item().Background(Colors.Grey.Lighten2).Height(150);
});
.Column(column =>
{
    column.Item().Background(Colors.Grey.Medium).Height(50);
    column.Item().Background(Colors.Grey.Lighten1).Height(100);
    column.Item().Background(Colors.Grey.Lighten2).Height(150);
});

example

Use the Spacing property to add some space between elements:

csharp
.Column(column =>
{
    column.Spacing(15);

    column.Item().Background(Colors.Grey.Medium).Height(50);
    column.Item().Background(Colors.Grey.Lighten1).Height(100);
    column.Item().Background(Colors.Grey.Lighten2).Height(150);
});
.Column(column =>
{
    column.Spacing(15);

    column.Item().Background(Colors.Grey.Medium).Height(50);
    column.Item().Background(Colors.Grey.Lighten1).Height(100);
    column.Item().Background(Colors.Grey.Lighten2).Height(150);
});

example

Released under the MIT License.