diff --git a/Toolbar/Custom Toolbar/Primary Custom Toolbar - SfPdfViewer/Without-Default-Options/Without-Default-Options/Pages/Index.razor b/Toolbar/Custom Toolbar/Primary Custom Toolbar - SfPdfViewer/Without-Default-Options/Without-Default-Options/Pages/Index.razor index ed2e220c..193da38b 100644 --- a/Toolbar/Custom Toolbar/Primary Custom Toolbar - SfPdfViewer/Without-Default-Options/Without-Default-Options/Pages/Index.razor +++ b/Toolbar/Custom Toolbar/Primary Custom Toolbar - SfPdfViewer/Without-Default-Options/Without-Default-Options/Pages/Index.razor @@ -9,8 +9,8 @@ @code{ private string DocumentPath { get; set; } = "wwwroot/Data/PDF_Succinctly.pdf"; - SfPdfViewer2 Viewer; - MemoryStream stream; + SfPdfViewer2 Viewer = default!; + MemoryStream stream = default!; // List provide the position and element for the custom toolbar items public List CustomToolbarItems = new List() @@ -24,45 +24,47 @@ // Get the renderfragment element for the custom toolbaritems in the primary toolbar private static RenderFragment GetTemplate(string name) { - return __builder => - { - if (name == "PreviousPage") - { - - - } - else if(name == "NextPage") - { - - - } - else if(name == "Save") - { - - - } - else if(name == "Download") - { - - - } - }; + if (name == "PreviousPage") + { + return @ + ; + } + + if (name == "NextPage") + { + return @ + ; + } + + if (name == "Save") + { + return @ + ; + } + + if (name == "Download") + { + return @ + ; + } + + return _ => { }; } // Click for the custom toolbaritems in the primary toolbar diff --git a/Toolbar/Custom Toolbar/Primary Custom Toolbar - SfPdfViewer/Without-Default-Options/Without-Default-Options/Without-Default-Options.csproj b/Toolbar/Custom Toolbar/Primary Custom Toolbar - SfPdfViewer/Without-Default-Options/Without-Default-Options/Without-Default-Options.csproj index 9127c7fa..2fa1ca70 100644 --- a/Toolbar/Custom Toolbar/Primary Custom Toolbar - SfPdfViewer/Without-Default-Options/Without-Default-Options/Without-Default-Options.csproj +++ b/Toolbar/Custom Toolbar/Primary Custom Toolbar - SfPdfViewer/Without-Default-Options/Without-Default-Options/Without-Default-Options.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable