PDF bookmarks are visualized in RadPdfViewer using the RadPdfViewerNavigationPane. This is a control representing an area which can display different panels, including bookmarks. It is designed to be extended in the future and contain other document-level navigation features, such as thumbnails or attachments. The RadPdfViewerNavigationPane exposes the PaneWidth property which sets the initial value of the pane’s width. The end-users can resize the pane’s width by dragging the splitter resided on the right side of the control.
The following commands are available in the RadPdfViewer.CommandDescriptors property. They are executed when the end-users interact with the bookmarks panel:
The commands can be invoked from code as follows:
The PDF model defines certain document preferences which determine how the bookmarks should be displayed. These preferences are included in the document, when it is created or modified, and apply each time it is rendered in the viewer. For example, a preference for the bookmarks panel can be set to be initially expanded or collapsed after the document is loaded, or a preference defining the styling of the bookmarks item text can be defined. With the support of PDF bookmarks in Telerik UI for WPF the following properties are added:
This property of the RadFixedDocument class specifies how the document should be initially displayed when opened:
This property of the BookmarkItem class specifies the style characteristics for displaying the bookmark text. The available options are:
The bookmarks panel is integrated with all themes provided by the Telerik UI for WPF suite. This includes the newly introduced Crystal theme which brings the Mac OS look and feel to your WPF apps. As with our other recent WPF themes, you can easily customize the theme colors to suit your taste with the Color Theme Generator for WPF.
We are working hard to deliver the support for bookmarks in Telerik UI for Winforms suite for the next R1 2019 release, expected at the beginning of the next year. You can find more information about what is coming in 2019 in the Telerik UI for WPF Roadmap and Telerik UI for Winforms Roadmap.
If you are new to Telerik UI for WPF, or this is the first time you are hearing about the suite, you can check out the webpages for WPF, download a trial to try them out for yourself and visit the documentation to get a hang of how they work.
Georgi Georgiev is a software developer on the Telerik Document Processing team located in Sofia, Bulgaria. While he is passionate in his work, during his free time you can find him in the Dojo, practicing Aikido, or exploring new places.
Subscribe to be the first to get our expert-written articles and tutorials for developers!