Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PdfViewer.UriOpening Event

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

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v24.2.dll

NuGet Package: DevExpress.Win.PdfViewer

#Declaration

public event PdfUriOpeningEventHandler UriOpening

#Event Data

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

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
Handled Gets or sets a value that specifies whether the PdfViewer.UriOpening event is handled; if handled, the Security Warning message box is hidden.
OriginalUriString Gets the original URI string from which the Uri object is created.
Uri Gets 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.

pdf-viewer-hyperlink-external-uri-security-warning

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