Skip to main content

SubDocument.CreatePosition(Int32) Method

Creates a new position in the current document.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

DocumentPosition CreatePosition(
    int start
)

Parameters

Name Type Description
start Int32

An integer value specifying the start position.

Returns

Type Description
DocumentPosition

A DocumentPosition object representing the position in the current document.

Example

The following code sample calls the SubDocument.CreatePosition method to obtain the document position at the given index and inserts a text in it:

IMAGE

using (var wordProcessor = new RichEditDocumentServer())
{
    Document document = wordProcessor.Document;
    DocumentPosition pos1 = document.CreatePosition(2);
    document.InsertText(pos1,"The Word Processing Document API is a non-visual .NET library.\r
    It allows you to automate frequent word processing tasks.\n");
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the CreatePosition(Int32) method.

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.

See Also