Back to Devexpress

BookmarkCollection.Create(DocumentPosition, Int32, String) Method

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-bookmarkcollection-dot-create-x28-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-documentposition-system-dot-int32-system-dot-string-x29.md

latest2.9 KB
Original Source

BookmarkCollection.Create(DocumentPosition, Int32, String) Method

Creates a bookmark with the specified name for the range that starts at the specified position and has the specified length and adds it to the collection.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
Bookmark Create(
    DocumentPosition start,
    int length,
    string name
)
vb
Function Create(
    start As DocumentPosition,
    length As Integer,
    name As String
) As Bookmark

Parameters

NameTypeDescription
startDocumentPosition

A DocumentPosition specifying the starting position for the bookmark.

| | length | Int32 |

An integer that specifies the length of the range in the bookmark.

| | name | String |

A string that specifies the bookmark’s name.

|

Returns

TypeDescription
Bookmark

A Bookmark object specifying the created bookmark.

|

Exceptions

TypeDescription
InvalidOperationException

Occurs if the document already contains a bookmark with the specified name. The BookmarkOptions.AllowNameResolution option is not applicable in this situation

|

See Also

Bookmarks

Remove(Bookmark)

Select(Bookmark)

BookmarkCollection Interface

BookmarkCollection Members

DevExpress.XtraRichEdit.API.Native Namespace