Back to Devexpress

PdfViewer.UriOpening Event

windowsforms-devexpress-dot-xtrapdfviewer-dot-pdfviewer-e00d119b.md

latest2.8 KB
Original Source

PdfViewer.UriOpening Event

Occurs after the hyperlink addressing an external URI (universal resource identifier) is clicked.

Namespace : DevExpress.XtraPdfViewer

Assembly : DevExpress.XtraPdfViewer.v25.2.dll

NuGet Package : DevExpress.Win.PdfViewer

Declaration

csharp
public event PdfUriOpeningEventHandler UriOpening
vb
Public Event UriOpening As PdfUriOpeningEventHandler

Event Data

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

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
HandledGets or sets a value that specifies whether the PdfViewer.UriOpening event is handled; if handled, the Security Warning message box is hidden.
OriginalUriStringGets the original URI string from which the Uri object is created.
UriGets the opened document’s URI (Uniform Resource Identifier).

Remarks

The following image illustrates a security warning displayed in a PDF Viewer when clicking a hyperlink addressing an external URI.

Set the e.Handled property to true to hide the message box. You can prevent URI opening without using the message box (e.Handled should be set to true) by setting the e.Cancel property to true.

See Also

ReferencedDocumentOpening

PdfViewer Class

PdfViewer Members

DevExpress.XtraPdfViewer Namespace