ChartControl.LoadFromStream(Stream) Method
Loads the chart layout from the specified stream.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v24.1.dll
NuGet Package: DevExpress.Wpf.Charts
Declaration
Parameters
Name | Type | Description |
---|---|---|
stream | Stream | The stream containing the chart to be loaded. An exception is raised if it is empty or null (Nothing in Visual Basic). |
Remarks
Use the LoadFromStream method to load the chart’s layout from the stream to which the layout was saved using the ChartControl.SaveToStream method.
Example
The following code saves the chart layout to a stream, and then loads the layout from the stream:
using System.IO;
//...
Stream stream = new MemoryStream();
// Save the chart.
stream.Seek(0, System.IO.SeekOrigin.Begin);
chartControl1.SaveToStream(stream);
// Load the chart.
stream.Seek(0, System.IO.SeekOrigin.Begin);
chartControl1.LoadFromStream(stream);
See Also