windowsforms-devexpress-dot-xtradiagram-dot-diagramcontrol-dot-savedocument-x28-system-dot-io-dot-stream-x29.md
Saves the diagram to the specified stream.
Namespace : DevExpress.XtraDiagram
Assembly : DevExpress.XtraDiagram.v25.2.dll
NuGet Package : DevExpress.Win.Diagram
public void SaveDocument(
Stream stream
)
Public Sub SaveDocument(
stream As Stream
)
| Name | Type | Description |
|---|---|---|
| stream | Stream |
The stream where the diagram will be saved.
|
To load a saved diagram, use DiagramControl.LoadDocument.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SaveDocument(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.
using(var stream = new MemoryStream()) {
diagram.SaveDocument(stream);
var diagramData = new DiagramData() {
Using stream = New MemoryStream()
diagram.SaveDocument(stream)
Dim diagramData = New DiagramData() With {.Name =(i + 1).ToString() & " items", .Data = stream.ToArray()}
See Also