Skip to content

PdfThumbnailsView Class

Definition

Namespace: Xfinium.Pdf.View

Defines a viewer control for PDF page thumbnails.

C#
public class PdfThumbnailsView : UserControl, IResource, IAnimatable, IInputElement, IFrameworkInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, IDisposable, IPdfView, IComponentConnector

Inheritance: Object → DispatcherObject → DependencyObject → Visual → UIElement → FrameworkElement → Control → ContentControl → UserControl → PdfThumbnailsView

Implements: IResource, IAnimatable, IInputElement, IFrameworkInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, IDisposable, IPdfView, IComponentConnector

Remarks

Use this control to display thumbnails of PDF pages. Set the Document property to display the desired PDF document and the DocumentView property to link it to a document view. When the user clicks on a thumbnail in the PdfThumbnailsView, the corresponding page in the linked PdfDocumentView will be displayed, allowing for easy navigation through the PDF document.

Note

To ensure proper functionality, please make sure the value of the Document property matches the document set in the linked PdfDocumentView. Otherwise, the thumbnail navigation may not work as expected.

Example

In your form's constructor initialize the PdfThumbnailsView and link it to a PdfDocumentView as follows:

C#
public MainWindow()
{
    // ...

    document = new PdfVisualDocument();
    documentView.Document = document;
    thumbnailsView.Document = document;
    thumbnailsView.DocumentView = documentView;

    // ...
}
When the window is closed, the viewer controls need to be disposed explicitly as follows:
C#
1
2
3
4
5
6
7
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
    document.Close();
    documentView.Dispose();
    thumbnailsView.Dispose();
    document.Dispose();
}

Constructor

Name Description
PdfThumbnailsView() Initializes a new PdfThumbnailsView object.

Fields

Name Description
AllowPagesReorderProperty AllowPagesReorderProperty Dependency Property
DocumentViewProperty DocumentView Dependency Property
ShowAnnotationsProperty ShowAnnotations Dependency Property
ShowDefaultPageContextMenuProperty ShowDefaultPageContextMenu Dependency Property
ShowFormFieldsProperty ShowAnnotations Dependency Property
ShowPageNumbersProperty ShowPageNumbers Dependency Property
ZoomProperty Zoom Dependency Property

Properties

Name Description
AllowPagesReorder Gets or sets a flag indicating whether pages reordering is allowed.
Document Gets or sets the document displayed in the viewer.
DocumentView Gets or sets the associated document view.
GraphicRendererFactory Gets or sets the graphic renderer factory.
PageDisplayLayout Gets or sets the current page display layout.
PageNumber Gets or sets the page number.
SelectionRectangleAppearance Gets or sets the appearance of the selection rectangle.
ShowAnnotations Gets or sets a value indicating whether the annotations should be displayed or not.
ShowDefaultPageContextMenu Gets of sets a flag indicating whether the default page context menu should be displayed when right-clicking on a page.
ShowFormFields Gets or sets a value indicating whether the annotations should be displayed or not.
ShowPageNumbers Gets or sets a flag indicating whether page numbers should be displayed.
Zoom Gets or sets the zoom level.

Methods

Name Description
Dispose Disposes the viewer control.
InitializeComponent InitializeComponent
ScrollToPageLocation Scrolls the viewer to the specified page at the given location.
UpdateOnDpiChange Updates the viewer content when the monitor dpi changes.

Events

Name Description
ZoomChanged Gets or sets the event that is fired when the zoom has changed.
PageNumberChanged Gets or sets the event that is fired when the page number has changed.
PageClick Gets or sets the event that is fired when a page has been clicked.
PageDoubleClick Gets or sets the event that is fired when a page has been double clicked.
PageContextMenu Gets or sets the event that is fired when a page context menu should be displayed.
BeforePageReorder Gets or sets the event that is fired when a set of pages is about to be reordered using drag and drop operations.
AfterPageReorder Gets or sets the event that is fired after a set of pages has been reordered.
BeforePageDelete Gets or sets the event that is fired when a page is about to be deleted using the default page context menu.
AfterPageDelete Gets or sets the event that is fired after a page has been deleted.
PageRenderingStarted Gets or sets the event that is fired when a page begins to be displayed.
PageRenderingCompleted Gets or sets the event that is fired when the page content for the page visible area is displayed in full.
PageRenderingCancelled Gets or sets the event that is fired when the page stops displaying content.