Click or drag to resize

PdfViewer Events

The PdfViewer type exposes the following members.

Events
 NameDescription
Public eventCurrentPageChanged Raised when the page shown in the viewer changes (CurrentPage).
Public eventDocumentLoaded Raised when a document loaded with LoadFile(String), LoadStream(Stream) or LoadBytes(Byte) is displayed in the viewer. PageCount holds the number of pages.
Public eventLoadError Raised when the viewer cannot load or display a document, or when the WebView2 Runtime is missing.
Public eventPasswordRequired Raised when the document being opened is password protected and the viewer needs its password: when no OpenPassword is set, and again when the password given was not correct (IsPasswordIncorrect). Set Password to open the document, or Cancel to stop opening it. When no password is set (or the event is not handled), the viewer asks the user for the password.
Public eventSearchCompleted Raised when a search is complete: after Find(String, Boolean, Boolean), FindNext and FindPrevious, and after a search made by the user in the find bar of the viewer. The event data has the number of matches in the document and the selected match.
Top
See Also