XRRichTextStreamType Enum

Specifies the types of input and output streams used to load and save data in the XRRichText control.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll

Declaration

public enum XRRichTextStreamType
Public Enum XRRichTextStreamType

Members

Name Description
HtmlText

An HTML stream.

PlainText

A plain text stream that includes spaces in places of Object Linking and Embedding (OLE) objects.

RtfText

A Rich Text Format (RTF) stream.

XmlText

A Microsoft Office Word Open XML Format (DOCX) stream.

Use the members of this enumeration when calling the XRRichText.LoadFile and XRRichText.SaveFile methods of the XRRichText control.

Examples

The following method demonstrates how to create an XRRichText object, set some of its properties, and then save its contents to a text file.

using System;
using DevExpress.XtraReports.UI;
// ...

public XRRichText CreateXRRichText(){
    // Create an XRRichText object.
    XRRichText xrRichText1 = new XRRichText();

    // Set its height to be calculated automatically,
    // and make its borders visible.
    xrRichText1.CanGrow = true;
    xrRichText1.CanShrink = true;         
    xrRichText1.Borders = DevExpress.XtraPrinting.BorderSide.All;

    // Create an array of lines and assign it to the rich text.
    string[] boxLines = new String[3];
    boxLines[0] = "Line 1";
    boxLines[1] = "Line 2";
    boxLines[2] = "Line 3";
    xrRichText1.Lines = boxLines;

    // Export its contents to a text file.
    xrRichText1.SaveFile("output.txt", XRRichTextStreamType.PlainText);

    return xrRichText1;
}

See Also