SubDocument.CreatePosition(Int32) Method
Creates a new position in the current document.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v24.2.Core.dll
NuGet Package: DevExpress.RichEdit.Core
#Declaration
DocumentPosition CreatePosition(
int start
)
#Parameters
Name | Type | Description |
---|---|---|
start | Int32 | An integer value specifying the start position. |
#Returns
Type | Description |
---|---|
Document |
A 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:
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");
}
#Related GitHub Examples
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.