windowsforms-devexpress-dot-xtradiagram-dot-diagramcontrol-dot-savedocument-x28-system-dot-string-x29.md
Using file paths sourced from untrusted input may expose unauthorized files or allow unintended file access. Always validate and normalize all external paths to prevent path manipulation.
Saves the diagram to the specified file.
Namespace : DevExpress.XtraDiagram
Assembly : DevExpress.XtraDiagram.v25.2.dll
NuGet Package : DevExpress.Win.Diagram
public void SaveDocument(
string fileName
)
Public Sub SaveDocument(
fileName As String
)
| Name | Type | Description |
|---|---|---|
| fileName | String |
The full path to the file 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(String) 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.
base.OnClosing(e);
diagramControl1.SaveDocument(diagramName);
}
MyBase.OnClosing(e)
diagramControl1.SaveDocument(diagramName)
End Sub
See Also