Back to Devexpress

Hyperlink.NavigateUri Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-hyperlink.md

latest6.1 KB
Original Source

Hyperlink.NavigateUri Property

Gets or sets a URI to navigate to when the hyperlink is activated.

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
string NavigateUri { get; set; }
vb
Property NavigateUri As String

Property Value

TypeDescription
String

A string representing an URI. The default is null.

|

Remarks

When the hyperlink points to a bookmark in the same document, the NavigateUri is null. The bookmark’s name is specified by the Hyperlink.Anchor property.

To create a hyperlink, use the HyperlinkCollection.Create method.

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

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.

office-file-api-ai-implementation/CS/Controllers/AccessibilityController.cs#L106

csharp
{
    if (string.IsNullOrEmpty(hyperlink.ToolTip) || hyperlink.ToolTip == hyperlink.NavigateUri)
    {

word-document-api-insert-dynamic-content/CS/Program.cs#L86

csharp
Hyperlink hyperlink = document.Hyperlinks.Create(range);
    hyperlink.NavigateUri = item.Links[0].Uri.ToString();
}

winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/BookmarksAndHyperlinks.cs#L32

csharp
document.Hyperlinks.Create(document.InsertText(hPos, "Follow me!"));
document.Hyperlinks[0].NavigateUri = "https://www.devexpress.com/Products/NET/Controls/WinForms/Rich_Editor/";
document.Hyperlinks[0].ToolTip = "WinForms Rich Text Editor";

wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/BookmarksAndHyperlinksActions.cs#L32

csharp
document.Hyperlinks.Create(document.InsertText(hPos, "Follow me!"));
document.Hyperlinks[0].NavigateUri = "https://www.devexpress.com/Products/NET/Controls/WinForms/Rich_Editor/";
document.Hyperlinks[0].ToolTip = "WinForms Rich Text Editor";

word-document-api-examples/CS/CodeExamples/BookmarksAndHyperlinks.cs#L49

csharp
// Specify the URI to which the hyperlink navigates.
document.Hyperlinks[0].NavigateUri = "https://devexpress.com";

word-document-api-insert-dynamic-content/VB/Module1.vb#L73

vb
Dim hyperlink As Hyperlink = document.Hyperlinks.Create(range)
    hyperlink.NavigateUri = item.Links(0).Uri.ToString()
End If

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/BookmarksAndHyperlinks.vb#L31

vb
document.Hyperlinks.Create(document.InsertText(hPos, "Follow me!"))
document.Hyperlinks(CInt((0))).NavigateUri = "https://www.devexpress.com/Products/NET/Controls/WinForms/Rich_Editor/"
document.Hyperlinks(CInt((0))).ToolTip = "WinForms Rich Text Editor"

wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/BookmarksAndHyperlinksActions.vb#L28

vb
document.Hyperlinks.Create(document.InsertText(hPos, "Follow me!"))
document.Hyperlinks(0).NavigateUri = "https://www.devexpress.com/Products/NET/Controls/WinForms/Rich_Editor/"
document.Hyperlinks(0).ToolTip = "WinForms Rich Text Editor"

word-document-api-examples/VB/CodeExamples/BookmarksAndHyperlinks.vb#L46

vb
' Specify the URI to which the hyperlink navigates.
document.Hyperlinks(0).NavigateUri = "https://devexpress.com"
' Specify the hyperlink tooltip.

See Also

Anchor

Create

Hyperlink Interface

Hyperlink Members

DevExpress.XtraRichEdit.API.Native Namespace