Browse Source

Replaced the obsolete methods from 2022.3 (InternalLink and Color)

knoxyz 3 years ago
parent
commit
44bd646bab
1 changed files with 3 additions and 3 deletions
  1. 3 3
      QuestPDF.ReportSample/Layouts/TableOfContentsTemplate.cs

+ 3 - 3
QuestPDF.ReportSample/Layouts/TableOfContentsTemplate.cs

@@ -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
                 });
         }
     }
-}
+}