Skip to main content

RichEditControl.RtfText Property

Gets or sets the formatted text content of the control.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v22.1.dll


public string RtfText { get; set; }

Property Value

Type Description

A string, containing the document’s content in rich text format.


Use this property to load an RTF content to the RichEditControl.

The RtfText property value is loaded as a new document in the rich text format. Check the RtfText property value when the RichEditControl.DocumentLoaded event handler, i.e. when the document is fully loaded.

The following code snippet displays the word “Test” in blue.

View Example

            string rtfString = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1049
{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}
{\f1\fswiss\fcharset0 Arial;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\cf1\lang1033\b\f0\fs32 Test.\cf0\b0\f1\fs20\par}";
            document.RtfText = rtfString;
See Also