Navigation Pane
- 2 minutes to read
This document consists of the following sections:
Built-In Panels
The navigation pane is used to display thumbnails, bookmarks, and attachments. You can open (close) Page Thumbnails, Bookmarks or Attachments panel using the corresponding tab in the navigation pane.
Bookmarks Panel
This panel displays bookmarks from the current PDF file, if any are present.
The Options drop-down list shows bookmark settings.
The table below describes these settings and lists the API used to specify the corresponding option in code.
Option | Description | API |
---|---|---|
Expand Current Bookmarks | Expands selected bookmark. | PdfOutlinesViewerCommands.ExpandCurrentNodeCommand |
Collapse/Expand Top-Level Bookmarks | Expands or collapses all bookmarks. | PdfOutlinesViewerCommands.ExpandTopLevelNodesCommand PdfOutlinesViewerCommands.CollapseTopLevelNodesCommand |
Hide After Use | Specifies whether to hide a panel after an outline was clicked. | DocumentMapSettings.HideAfterUse |
Wrap Long Bookmarks | Specifies whether to wrap long bookmark names. | DocumentMapSettings.WrapLongLines |
Attachments Panel
This panel displays the list of file attachments in the current PDF file, if any are present.
This panel uses the DevExpress.Xpf.Grid.GridControl to display the list. You can sort and filter attachments by name, description, size, and date modified.
When you open an attachment, the Security Warning message appears. Handle the PdfViewerControl.AttachmentOpening event to hide the message box.
Thumbnails Panel
This panel displays page navigate thumbnails.
The Options drop-down list shows thumbnail settings. This list can also be accessed from the panel’s context menu.
Option | Description | Command |
---|---|---|
Print Page(s) | Invokes the Print dialog to print pages that correspond to the selected thumbnails. If there are no selected thumbnails in the panel, all the pages are printed. | PdfThumbnailsViewerControl.PrintPagesCommand |
Enlarge Page Thumbnails | Increases the page thumbnails size. | PdfThumbnailsViewerControl.ZoomInCommand |
Reduce Page Thumbnails | Decreases the page thumbnails size. | PdfThumbnailsViewerControl.ZoomOutCommand |
You can use the zoom slider or Ctrl+Mouse Wheel shortcut to enlarge/reduce thumbnails.
Customization
Change the Navigation Pane’s Layout
Specify the DevExpress.Xpf.PdfViewer.NavigationPanelsLayout property to change the Navigation Pane‘s layout.
The Navigation Pane can have a floating panel (NavigationPanelsLayout.DockPanel) or tab container (NavigationPanelsLayout.Tab) layout.
Change Settings of Each Panel
Use one of the following properties to access a panel’s settings:
- PdfViewerControl.OutlinesViewerSettings
- PdfViewerControl.AttachmentsViewerSettings
- PdfViewerControl.ThumbnailsViewerSettings
The code sample below shows how to access the Thumbnails panel settings in XAML.
<dxpdf:PdfViewerControl>
<dxpdf:PdfViewerControl.ThumbnailsViewerSettings>
<dxpdf:PdfThumbnailsViewerSettings/>
</dxpdf:PdfViewerControl.ThumbnailsViewerSettings>
</dxpdf:PdfViewerControl>
The table below describes main panel settings:
Member | Description |
---|---|
HideOutlinesViewer HideAttachmentsViewer HideThumbnailsViewer |
Gets or sets whether to hide the panel. |
OutlinesViewerInitialState AttachmentsViewerInitialState ThumbnailsViewerInitialState |
Specifies the panel’s visibility after the document is loaded. |
OutlinesViewerState AttachmentsViewerState ThumbnailsViewerState |
Specifies the panel’s visibility. |
OutlinesViewerStyle AttachmentsViewerStyle ThumbnailsViewerStyle |
Get or sets the panel’s style settings. |