Back to Devexpress

DiagramControl.NewDocument() Method

windowsforms-devexpress-dot-xtradiagram-dot-diagramcontrol-2d0f13ae.md

latest2.4 KB
Original Source

DiagramControl.NewDocument() Method

Discards the current document and creates a new one.

Namespace : DevExpress.XtraDiagram

Assembly : DevExpress.XtraDiagram.v25.2.dll

NuGet Package : DevExpress.Win.Diagram

Declaration

csharp
public void NewDocument()
vb
Public Sub NewDocument

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the NewDocument() 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.

how-to-handle-diagramcontrol-events-to-save-diagrams-to-a-database-instead-of-a-file-system-t360920/CS/XtraDiagram.CustomDiagramStorage/Form1.cs#L33

csharp
if(e.DocumentSource == null) {
    diagramControl1.NewDocument();
    Text = "(New Document)";

how-to-handle-diagramcontrol-events-to-save-diagrams-to-a-database-instead-of-a-file-system-t360920/VB/XtraDiagram.CustomDiagramStorage/Form1.vb#L33

vb
If e.DocumentSource Is Nothing Then
    diagramControl1.NewDocument()
    Text = "(New Document)"

See Also

DiagramControl Class

DiagramControl Members

DevExpress.XtraDiagram Namespace