Dashboard.LoadFromXml(Stream) Method
Loads a dashboard from the specified stream.
Namespace: DevExpress.DashboardCommon
Assembly: DevExpress.Dashboard.v19.1.Core.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
stream | Stream | A Stream object that is a stream containing a dashboard. |
Remarks
You need a dashboard (a Dashboard instance) to be created to use the Dashboard.LoadFromXml method.
To load a dashboard from an XML file, use another overload of the LoadFromXml method that takes a string filePath parameter. You can use the DashboardDesigner.LoadDashboard / DashboardViewer.LoadDashboard methods as an alternative to the Dashboard.LoadFromXml method.
To save a dashboard to a file or stream, use the Dashboard.SaveToXml method.
The following code snippet shows how to load a dashboard from the stream. Note that when you load a dashboard from a stream, you need to set the position to the beginning of the stream:
var newDashboard = new Dashboard();
var stream = new System.IO.MemoryStream();
// ...
newDashboard.SaveToXml(stream);
// ...
stream.Seek(0, System.IO.SeekOrigin.Begin);
dashboardControl1.Dashboard.LoadFromXML(stream);
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the LoadFromXml(Stream) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.