officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-subdocument-ee0a7c15.md
Provides access to the collection of document bookmarks.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
BookmarkCollection Bookmarks { get; }
ReadOnly Property Bookmarks As BookmarkCollection
| Type | Description |
|---|---|
| BookmarkCollection |
A BookmarkCollection object specifying a bookmarks collection.
|
Use the BookmarkCollection.Create method to create a new bookmark. To remove the bookmark, use the BookmarkCollection.Remove method.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Bookmarks 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/DocumentProperties.cs#L49
document.CustomProperties["MyStringProperty"]="The Final Answer";
document.CustomProperties["MyBookmarkProperty"] = document.Bookmarks[0];
document.CustomProperties["MyBooleanProperty"]=true;
winforms-richedit-iterate-through-all-sub-documents/CS/Form1.cs#L31
for (int i = subdoc.Bookmarks.Count - 1; i >= 0; i--)
subdoc.Bookmarks.Remove(subdoc.Bookmarks[i]);
}));
document.CustomProperties["MyStringProperty"] = "The Final Answer";
document.CustomProperties["MyBookmarkProperty"] = document.Bookmarks[0];
document.CustomProperties["MyBooleanProperty"] = true;
word-document-api-iterate-through-all-sub-documents/CS/Program.cs#L45
for (int i = subdoc.Bookmarks.Count - 1; i >= 0; i--)
subdoc.Bookmarks.Remove(subdoc.Bookmarks[i]);
}));
winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/DocumentProperties.vb#L45
document.CustomProperties("MyStringProperty") = "The Final Answer"
document.CustomProperties("MyBookmarkProperty") = document.Bookmarks(0)
document.CustomProperties("MyBooleanProperty") = True
winforms-richedit-iterate-through-all-sub-documents/VB/Form1.vb#L22
For i As Integer = subdoc.Bookmarks.Count - 1 To 0 Step -1
subdoc.Bookmarks.Remove(subdoc.Bookmarks(i))
Next
document.CustomProperties("MyStringProperty") = "The Final Answer"
document.CustomProperties("MyBookmarkProperty") = document.Bookmarks(0)
document.CustomProperties("MyBooleanProperty") = True
word-document-api-iterate-through-all-sub-documents/VB/Program.vb#L40
For i As Integer = subdoc.Bookmarks.Count - 1 To 0 Step -1
subdoc.Bookmarks.Remove(subdoc.Bookmarks(i))
Next
See Also