Back to Devexpress

Hyperlink.Anchor Property

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

latest4.4 KB
Original Source

Hyperlink.Anchor Property

Gets or sets the name of a bookmark in the current document which shall be the target of the hyperlink.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

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

Property Value

TypeDescription
String

A string representing the bookmark’s name.

|

Remarks

If the link points to an existing file or a web page, specified by the Hyperlink.NavigateUri property, then the Anchor value is null.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Anchor 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.

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

csharp
document.Hyperlinks.Create(document.InsertText(pos1, "get to the top"));
document.Hyperlinks[0].Anchor = "Top";
document.EndUpdate();

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

csharp
document.Hyperlinks.Create(document.InsertText(pos1, "get to the top"));
document.Hyperlinks[0].Anchor = "Top";
document.EndUpdate();

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

csharp
document.Hyperlinks.Create(hyperlinkRange);
document.Hyperlinks[0].Anchor = "Top";

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

vb
document.Hyperlinks.Create(document.InsertText(pos1, "get to the top"))
document.Hyperlinks(CInt((0))).Anchor = "Top"
document.EndUpdate()

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

vb
document.Hyperlinks.Create(document.InsertText(pos1, "get to the top"))
document.Hyperlinks(0).Anchor = "Top"
document.EndUpdate()

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

vb
document.Hyperlinks.Create(hyperlinkRange)
document.Hyperlinks(0).Anchor = "Top"
' Finalize to edit the document.

See Also

NavigateUri

Hyperlink Interface

Hyperlink Members

DevExpress.XtraRichEdit.API.Native Namespace