officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-hyperlink-9bfa445e.md
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
string Anchor { get; set; }
Property Anchor As String
| Type | Description |
|---|---|
| String |
A string representing the bookmark’s name.
|
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
document.Hyperlinks.Create(document.InsertText(pos1, "get to the top"));
document.Hyperlinks[0].Anchor = "Top";
document.EndUpdate();
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
document.Hyperlinks.Create(hyperlinkRange);
document.Hyperlinks[0].Anchor = "Top";
winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/BookmarksAndHyperlinks.vb#L22
document.Hyperlinks.Create(document.InsertText(pos1, "get to the top"))
document.Hyperlinks(CInt((0))).Anchor = "Top"
document.EndUpdate()
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
document.Hyperlinks.Create(hyperlinkRange)
document.Hyperlinks(0).Anchor = "Top"
' Finalize to edit the document.
See Also