Skip to main content
All docs

SankeyDiagramControl.LoadFromStream(Stream) Method

Restores the diagram’s layout from a stream.

Namespace: DevExpress.Xpf.Charts.Sankey

Assembly: DevExpress.Xpf.Charts.v23.2.dll

NuGet Package: DevExpress.Wpf.Charts


public void LoadFromStream(
    Stream stream


Name Type Description
stream Stream

A Stream descendant from which the layout is loaded.


Use the LoadFromStream method to load the diagram’s layout from a stream. If the specified stream is empty or null (Nothing in Visual Basic), an exception is raised. To save the diagram layout to a stream, use the SankeyDiagramControl.SaveToStream method.

The following code saves the diagram’s layout to a stream, and then loads the layout from the stream:

using System.IO;

  Stream stream = new MemoryStream();

  // Save the diagram.
  stream.Seek(0, System.IO.SeekOrigin.Begin);

  // Load the diagram.
  stream.Seek(0, System.IO.SeekOrigin.Begin);
See Also