Replaced the obsolete methods from 2022.3 (InternalLink and Color)

This commit is contained in:
knoxyz
2022-04-29 11:36:28 +02:00
committed by GitHub
parent e54e09de15
commit 44bd646bab
@@ -41,7 +41,7 @@ namespace QuestPDF.ReportSample.Layouts
private void DrawLink(IContainer container, int number, string locationName)
{
container
.InternalLink(locationName)
.SectionLink(locationName)
.Row(row =>
{
row.ConstantItem(25).Text($"{number}.");
@@ -52,7 +52,7 @@ namespace QuestPDF.ReportSample.Layouts
text.Span(" - ");
text.EndPageNumberOfSection(locationName);
var lengthStyle = TextStyle.Default.Color(Colors.Grey.Medium);
var lengthStyle = TextStyle.Default.FontColor(Colors.Grey.Medium);
text.Span(" (").Style(lengthStyle);
text.TotalPagesWithinSection(locationName).Style(lengthStyle).Format(x => x == 1 ? "1 page long" : $"{x} pages long");
@@ -61,4 +61,4 @@ namespace QuestPDF.ReportSample.Layouts
});
}
}
}
}