Skip to main content

DiagramControl.LoadDocument(Stream) Method

Loads a diagram document from a stream.

Namespace: DevExpress.Xpf.Diagram

Assembly: DevExpress.Xpf.Diagram.v24.1.dll

NuGet Package: DevExpress.Wpf.Diagram

Declaration

public void LoadDocument(
    Stream stream
)

Parameters

Name Type Description
stream Stream

The stream from which to load a diagram document.

Remarks

Use the DiagramControl.DocumentSource property to get the current document supplier for the DiagramControl.

To implement diagram custom loading logic, handle the DiagramControl.CustomLoadDocument event.

You may encounter exceptions when loading/saving a diagram (e.g., when trying to load a diagram from a file that does not exist, or saving to a read-only file). To handle or suppress these exceptions, use the DiagramControl.ExceptionMessage event.

A diagram can be saved to a file or stream with the DiagramControl.SaveDocument method.

See Also