Class NavigationToolbarSettings
Provides configuration options for customizing the navigation toolbar in the PDF Viewer.
Inheritance
Namespace: Syncfusion.Blazor.SfPdfViewer
Assembly: Syncfusion.Blazor.SfPdfViewer.dll
Syntax
public class NavigationToolbarSettings : SfBaseComponent
Remarks
The NavigationToolbarSettings
element enables developers to define the toolbar layout and behavior
by specifying the built-in navigation items and injecting custom toolbar items.
It enhances navigation flexibility and allows integration of additional actions tailored to user needs.
Examples
<SfPdfViewer2
DocumentPath="wwwroot/PDF/test.pdf"
Width="100%"
Height="100%"
EnableNavigationPanel="true">
<NavigationToolbarSettings
BuiltInItems="@Items"
CustomItems="@CustomItems">
</NavigationToolbarSettings>
</SfPdfViewer2>
Constructors
NavigationToolbarSettings()
Declaration
public NavigationToolbarSettings()
Properties
BuiltInItems
Represents the available navigation toolbar items in the SfPdfViewer2 component.
Declaration
public List<NavigationToolbarItem> BuiltInItems { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<NavigationToolbarItem> | A collection of NavigationToolbarItem enumeration values representing the built-in navigation tools in the PDF Viewer. |
Remarks
The NavigationToolbarItem enumeration defines the built-in toolbar options that appear within the modern navigation panel of the PDF Viewer.
These items allow users to quickly navigate the document using features like thumbnails, bookmarks, and comment panel access. Use these values to configure the navigation toolbar according to application needs.
Examples
The following example demonstrates how to configure the navigation toolbar with specific items:
List<NavigationToolbarItem> Items = new List<NavigationToolbarItem>
{
NavigationToolbarItem.CommentPanel,
NavigationToolbarItem.Thumbnails,
NavigationToolbarItem.Bookmarks
};
CustomItems
Defines a collection of custom toolbar items that can be injected into the PDF Viewer’s navigation toolbar.
Declaration
public List<CustomNavigationToolbarItem> CustomItems { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<CustomNavigationToolbarItem> | A collection of |
Remarks
Use this property to extend the default navigation toolbar with user-defined actions. Custom items allow developers to configure tooltips, icons, command bindings, and placement within the toolbar. The index determines the position of each item, ensuring precise control over the toolbar layout.
Examples
<SfPdfViewer2
DocumentPath="wwwroot/PDF/test.pdf"
Width="100%"
Height="100%"
EnableNavigationPanel="true">
<NavigationToolbarSettings
CustomItems="@CustomItems">
</NavigationToolbarSettings>
</SfPdfViewer2>
@code {
List<CustomNavigationToolbarItem> CustomItems = new List<CDATA[CustomNavigationToolbarItem> {
new CustomNavigationToolbarItem { Index = 3, Name = "Notes", IconCss = "e-pv-Note" }
};
}
JsNamespace
Declaration
protected virtual string JsNamespace { get; set; }
Property Value
Type |
---|
System.String |
jsProperty
Declaration
protected string jsProperty { get; set; }
Property Value
Type |
---|
System.String |
LoadOn
Specifies the strategy for loading template content in the PDF Viewer navigation panel.
Declaration
public ContentLoad LoadOn { get; set; }
Property Value
Type | Description |
---|---|
ContentLoad | A |
Remarks
Use this property to control when and how template content is rendered in the DOM.
Dynamic
: Only the selected template is loaded at any time; switching templates replaces the content.Init
: All template contents are loaded during the initial render and remain in the DOM.Demand
: Template load content when selected; once loaded, content stays in the DOM. This helps tailor performance based on application behavior and memory sensitivity.
Examples
<SfPdfViewer2 Height="100%" Width="100%" DocumentPath="wwwroot/Annotation.pdf" EnableNavigationPanel="true">
<NavigationToolbarSettings
LoadOn="ContentLoad.Init"
CustomItems="@CustomItems"
BuiltInItems="BuiltInItems">
</NavigationToolbarSettings>
</SfPdfViewer2>
mainParent
Declaration
protected SfBaseComponent mainParent { get; set; }
Property Value
Type |
---|
SfBaseComponent |
SfTagIndex
Declaration
protected virtual int SfTagIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
OnAfterRender(Boolean)
Declaration
protected override void OnAfterRender(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |
OnParametersSet()
Declaration
protected override void OnParametersSet()
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |