Back to Devexpress

PdfViewerControl.DocumentLoaded Event

wpf-devexpress-dot-xpf-dot-pdfviewer-dot-pdfviewercontrol-9a046719.md

latest5.9 KB
Original Source

PdfViewerControl.DocumentLoaded Event

Occurs when a PdfViewerControl control loads a PDF document.

Namespace : DevExpress.Xpf.PdfViewer

Assembly : DevExpress.Xpf.PdfViewer.v25.2.dll

NuGet Package : DevExpress.Wpf.PdfViewer

Declaration

csharp
public event RoutedEventHandler DocumentLoaded
vb
Public Event DocumentLoaded As RoutedEventHandler

Event Data

The DocumentLoaded event's data class is RoutedEventArgs. The following properties provide information specific to this event:

PropertyDescription
HandledGets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.
OriginalSourceGets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.
RoutedEventGets or sets the RoutedEvent associated with this RoutedEventArgs instance.
SourceGets or sets a reference to the object that raised the event.

The event data class exposes the following methods:

MethodDescription
InvokeEventHandler(Delegate, Object)When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation.
OnSetSource(Object)When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes.

The following code snippets (auto-collected from DevExpress Examples) contain references to the DocumentLoaded event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-pdf-viewer-create-text-markup-annotation-and-specify-its-properties/CS/MarkupAnnotations/MainWindow.xaml#L11

xml
<dxpdf:PdfViewerControl x:Name="viewer" DocumentLoaded="viewer_DocumentLoaded">
        <dxpdf:PdfViewerControl.MarkupToolsSettings>

wpf-pdf-viewer-import-and-export-acroform-data/CS/MainWindow.xaml#L15

xml
DocumentClosing="Viewer_DocumentClosing"
        DocumentLoaded="Viewer_DocumentLoaded"/>
</Grid>

how-to-use-pdf-printer-settings/CS/SpecifyPrinterSettings/MainWindow.xaml#L12

xml
<dxpdf:PdfViewerControl x:Name="pdfViewer" DocumentLoaded="pdfViewer_DocumentLoaded"/>

wpf-pdf-viewer-import-and-export-acroform-data/CS/obj/Debug/net8.0-windows/MainWindow.g.cs#L100

csharp
#line 15 "..\..\..\MainWindow.xaml"
this.Viewer.DocumentLoaded += new System.Windows.RoutedEventHandler(this.Viewer_DocumentLoaded);

wpf-pdf-viewer-import-and-export-acroform-data/VB/obj/Debug/net8.0-windows/MainWindow.g.vb#L91

vb
#ExternalSource("..\..\..\MainWindow.xaml",14)
AddHandler Me.Viewer.DocumentLoaded, New System.Windows.RoutedEventHandler(AddressOf Me.Viewer_DocumentLoaded)

See Also

PdfViewerControl Class

PdfViewerControl Members

DevExpress.Xpf.PdfViewer Namespace