Skip to main content

DevExpress v24.1 Update — Your Feedback Matters

Our What's New in v24.1 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

Hyperlinks

  • 2 minutes to read

This document introduces hyperlinks and explains how to customize hyperlink opening behavior.

A hyperlink is a reference to data that you can directly follow by clicking a document page. Hyperlinks can point to a page, an external document or to URI (uniform resource identifier).

To navigate to a specific location within a document, click a link that refers to that location.

DocumentLink

If you click a hyperlink addressing an external URI, the PdfViewerControl.UriOpening event is raised.

HyperlinkToURI

The PdfViewerControl.UriOpening event allows you to customize the URI opening behavior. The e.Handled property is set to false by default. In this case, the PDF Viewer invokes a Security Warning message box, which warns you that the PDF Viewer will use an external resource to open the URI.

MessageBox

Click Yes to open the URI in the PDF Viewer, otherwise click No. Set the e.Handled property to true if you want 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 UriOpeningEventArgs.Cancel property to true.

When you click a link in a PDF document to open an embedded or external document, the PdfViewerControl.ReferencedDocumentOpening event is raised. You can obtain the document source using the ReferencedDocumentOpeningEventArgs.DocumentSource property and get information about whether the referenced document was opened in an external application using the ReferencedDocumentOpeningEventArgs.OpenInNewWindow property.