Skip to content

Decoration

Divides the container's space into three distinct sections: before, content, and after.

The before section is rendered above the main content, while the after section is rendered below it. If the main content spans across multiple pages, both the before and after sections are consistently rendered on every page.

API

MethodDescription
BeforeReturns a container for the section positioned before (above) the primary main content.
ContentReturns a container for the main section.
AfterReturns a container for the section positioned after (below) the main content.

Example

A typical use-case for this method is to render a table that spans multiple pages, with a consistent caption or header on each page.

c#
container
    .MaxHeight(300)
    .MaxWidth(300)
    .Decoration(decoration =>
    {
        decoration
            .Before()
            .Background(Colors.Grey.Medium)
            .Padding(10)
            .Text("Notes").FontColor("#FFF").Bold();
    
        decoration
            .Content()
            .Background(Colors.Grey.Lighten3)
            .Padding(10)
            .Text(Helpers.Placeholders.LoremIpsum());
    });

Page 1: example

Page 2: example

Released under the MIT License