Skip to main content

XRRichText.LoadFile(Stream, XRRichTextStreamType) Method

Loads the contents of a data stream into the XRRichText control.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.1.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

public void LoadFile(
    Stream data,
    XRRichTextStreamType streamType
)

Parameters

Name Type Description
data Stream

A Stream of data to load into the XRRichText control.

streamType XRRichTextStreamType

An XRRichTextStreamType enumeration value that specifies the type of stream used to load data into the XRRichText control.

Remarks

A user can specify a stream type to load files of a particular format into the XRRichText control. The contents of the control are replaced with the newly loaded data.

The following code snippet loads a data stream in DOCX format into the XRRichText control:

public partial class XtraReport1 : DevExpress.XtraReports.UI.XtraReport {
    public XtraReport3() {
        InitializeComponent();
        System.IO.Stream stream = File.OpenRead("test.docx");
        // ...
        // You can modify data contained in the open stream.
        // ...
        this.xrRichText1.LoadFile(stream, XRRichTextStreamType.XmlText);
    }
}
See Also