ChartControl.SaveToStream(Stream) Method
Saves the chart layout to 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 to which the chart layout should be written. |
Remarks
The SaveToStream method saves the chart layout (information about available series, series settings, etc.) to the specified stream. Use the ChartControl.LoadFromStream method to restore saved settings from the stream.
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