2022-03-20 01:53:51 +01:00
|
|
|
using Avalonia.Media;
|
|
|
|
|
using QuestPDF.Fluent;
|
2022-03-16 22:54:03 +01:00
|
|
|
using QuestPDF.Helpers;
|
|
|
|
|
using QuestPDF.Infrastructure;
|
|
|
|
|
using QuestPDF.Previewer;
|
2022-03-20 01:53:51 +01:00
|
|
|
using Colors = QuestPDF.Helpers.Colors;
|
2022-03-16 22:54:03 +01:00
|
|
|
|
|
|
|
|
Document
|
|
|
|
|
.Create(container =>
|
|
|
|
|
{
|
|
|
|
|
container.Page(page =>
|
|
|
|
|
{
|
|
|
|
|
page.Size(PageSizes.A4);
|
|
|
|
|
page.Margin(2, Unit.Centimetre);
|
|
|
|
|
page.PageColor(Colors.White);
|
|
|
|
|
page.DefaultTextStyle(x => x.FontSize(20));
|
|
|
|
|
|
|
|
|
|
page.Header()
|
|
|
|
|
.Text("Hot Reload!")
|
|
|
|
|
.SemiBold().FontSize(36).FontColor(Colors.Blue.Darken2);
|
|
|
|
|
|
|
|
|
|
page.Content()
|
|
|
|
|
.PaddingVertical(1, Unit.Centimetre)
|
|
|
|
|
.Column(x =>
|
|
|
|
|
{
|
|
|
|
|
x.Spacing(20);
|
|
|
|
|
|
2022-03-17 12:05:27 +01:00
|
|
|
x.Item().Table(t =>
|
|
|
|
|
{
|
|
|
|
|
t.ColumnsDefinition(c =>
|
|
|
|
|
{
|
|
|
|
|
c.RelativeColumn();
|
|
|
|
|
c.RelativeColumn(3);
|
|
|
|
|
});
|
2022-03-16 22:54:03 +01:00
|
|
|
|
2022-03-17 12:05:27 +01:00
|
|
|
t.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(5).Text("Visual Studio");
|
|
|
|
|
t.Cell().Border(1).Padding(5).Text("Start in debug mode with 'Hot Reload on Save' enabled.");
|
|
|
|
|
t.Cell().Border(1).Background(Colors.Grey.Lighten3).Padding(5).Text("Command line");
|
|
|
|
|
t.Cell().Border(1).Padding(5).Text("Run 'dotnet watch'.");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
x.Item().Text("Modify this line and the preview should show your changes instantly.");
|
2022-03-16 22:54:03 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
page.Footer()
|
|
|
|
|
.AlignCenter()
|
|
|
|
|
.Text(x =>
|
|
|
|
|
{
|
|
|
|
|
x.Span("Page ");
|
|
|
|
|
x.CurrentPageNumber();
|
|
|
|
|
});
|
|
|
|
|
});
|
2022-03-20 01:53:51 +01:00
|
|
|
|
|
|
|
|
container.Page(page =>
|
|
|
|
|
{
|
|
|
|
|
page.Size(PageSizes.A3);
|
|
|
|
|
page.Margin(2, Unit.Centimetre);
|
|
|
|
|
page.PageColor(Colors.White);
|
|
|
|
|
page.DefaultTextStyle(x => x.FontSize(20));
|
|
|
|
|
|
|
|
|
|
page.Content()
|
|
|
|
|
.PaddingVertical(1, Unit.Centimetre)
|
|
|
|
|
.Column(x =>
|
|
|
|
|
{
|
|
|
|
|
x.Spacing(20);
|
|
|
|
|
|
|
|
|
|
foreach (var i in Enumerable.Range(0, 10))
|
|
|
|
|
x.Item().Background(Colors.Grey.Lighten2).Height(80);
|
|
|
|
|
});
|
|
|
|
|
});
|
2022-03-16 22:54:03 +01:00
|
|
|
})
|
|
|
|
|
.ShowInPreviewer();
|