Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DiagramControl.LoadDocument(String) Method

Loads a diagram from the specified file.

Namespace: DevExpress.Xpf.Diagram

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

NuGet Package: DevExpress.Wpf.Diagram

#Declaration

public void LoadDocument(
    string fileName
)

#Parameters

Name Type Description
fileName String

A string specifying the path of the file containing a diagram.

#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