XRRichText.LoadFile(Stream, XRRichTextStreamType) Method
SECURITY NOTE
Do not load files obtained from untrusted sources. Such files may pose a security risk. Please review the following article for additional information:
Suppress Control Requests to Download Data from External URLs
Loads the contents of a data stream into the XRRichText control.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v24.2.dll
NuGet Package: DevExpress.Reporting.Core
Declaration
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);
}
}