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.Text Property

Gets or sets the document's text (plain text).

Namespace: DevExpress.XtraRichEdit.API.Native

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

Declaration

string Text { get; set; }
Property Text As String
string Text { get; set; }
Property Text As String

Property Value

Type Description
String

A string value that specifies the text of the document.

Property Value

Type Description
String

A string value that specifies the text of the document.

Remarks

The text is displayed using default formatting (or the text formatting specified via the RichEditAppearance.Text property).

Assigning a value to this property results in a new loaded document that is imported from the plain text format. So, all appropriate events are fired in this case. If you want to just clear the text of an existing document, use the SubDocument.Delete method with a SubDocument.Range as a parameter. This technique will not reset document properties. To wipe off the trace of this operation so it can not be undone, use the RichEditControl.ClearUndo method, as follows:


richEdit.Document.Delete(richEdit.Document.Range);
richEdit.ClearUndo();
See Also