Skip to main content

DiagramControl.ShowingOpenImageDialog Event

Fires before showing an ‘Insert Picture’ dialog, and allows it to be customized.

Namespace: DevExpress.XtraDiagram

Assembly: DevExpress.XtraDiagram.v24.2.dll

Declaration

[DiagramCategory(DiagramCategory.DiagramItems)]
public event EventHandler<DiagramShowingOpenImageDialogEventArgs> ShowingOpenImageDialog

Event Data

The ShowingOpenImageDialog event's data class is DiagramShowingOpenImageDialogEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
Filter Gets or sets the string that determines the file filtering options that appear in the dialog.
ImageSourceToOpen Gets or sets the object from which to load the image skipping the dialog window. This object can be a full file path, Uri object, stream or array of bytes.
InitialDirectory Gets or sets the path to the directory displayed by the dialog.
Title Gets or sets the title of the dialog.

Remarks

This event allows you to respond to an ‘Insert Picture’ dialog being invoked. You can handle it to change the dialog or prevent it from being displayed. To prevent the dialog from being displayed, set the event’s Cancel parameter to true.

You can also use the following event’s options:

  • ImageSourceToOpen - allows you to specify the object that contains the image.
  • Filter - allows you to specify the current file name filter string which determines the files that are displayed by the dialog box.
  • InitialDirectory - allows you to specify the initial directory displayed by the dialog box.
  • Title - allows you to specify the dialog box title.
See Also