Skip to main content
A newer version of this page is available. .

RichEditControl.Text Property

Gets or sets the plain text content of the control.

Namespace: DevExpress.Xpf.RichEdit

Assembly: DevExpress.Xpf.RichEdit.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.RichEdit, DevExpress.Wpf.RichEdit

Declaration

public string Text { get; set; }

Property Value

Type Description
String

A string, containing the document’s unformatted text.

Remarks

Use the SubDocument.Delete method with a SubDocument.Range as a parameter to clear the text of an existing document. This technique does not reset document properties. Use the RichEditControl.ClearUndo method to wipe off this operation’s trace so it cannot be undone, as follows:

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

Assigning the Text property value results in a new loaded document that is imported from the plain text format. Check the Text property value when the RichEditControl.DocumentLoaded event handler, i.e. when the document is fully loaded.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Text property.

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