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.CustomLoadDocument Event

Fires after an end-user selects a file in the ‘Open File’ dialog, or after a document load is initiated by setting the DiagramControl.DocumentSource property in code.

Namespace: DevExpress.XtraDiagram

Assembly: DevExpress.XtraDiagram.v24.2.dll

NuGet Package: DevExpress.Win.Diagram

#Declaration

[DiagramCategory(DiagramCategory.DiagramDocument)]
public event EventHandler<DiagramCustomLoadDocumentEventArgs> CustomLoadDocument

#Event Data

The CustomLoadDocument event's data class is DevExpress.XtraDiagram.DiagramCustomLoadDocumentEventArgs.

#Remarks

The CustomLoadDocument event allows you to implement custom logic for loading diagram data. The DocumentSource event parameter specifies the selected document supplier. If an end-user selected a file to be loaded in the ‘Open File’ dialog, the DocumentSource event parameter will specify the full path to the file. If a document load is initiated by setting the DiagramControl.DocumentSource property, the DocumentSource event parameter will match the DiagramControl.DocumentSource property value.

You can set the Handled event parameter to true to disable the default loading mechanism and implement custom load logic instead.

See Also