The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Document.CaretPosition Property

Gets or sets the position of the caret within the document.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v19.1.Core.dll

Declaration

DocumentPosition CaretPosition { get; set; }
Property CaretPosition As DocumentPosition
DocumentPosition CaretPosition { get; set; }
Property CaretPosition As DocumentPosition

Property Value

Type Description
DocumentPosition

A DocumentPosition object, representing the current caret position.

Property Value

Type Description
DocumentPosition

A DocumentPosition object, representing the current caret position.

Remarks

Use this property to insert text at the current cursor position or to access the paragraph where the cursor is located (the ReadOnlyParagraphCollection.Get method).

Note

When working with headers/footers, use the DocumentPosition.BeginUpdateDocument - DocumentPosition.EndUpdateDocument pair to get the correct position. Otherwise an InvalidOperationException is thrown.

See Also