Back to Devexpress

DiagramControl.ShowingOpenImageDialog Event

windowsforms-devexpress-dot-xtradiagram-dot-diagramcontrol-537ce05f.md

latest3.2 KB
Original Source

DiagramControl.ShowingOpenImageDialog Event

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

Namespace : DevExpress.XtraDiagram

Assembly : DevExpress.XtraDiagram.v25.2.dll

NuGet Package : DevExpress.Win.Diagram

Declaration

csharp
[DiagramCategory(DiagramCategory.DiagramItems)]
public event EventHandler<DiagramShowingOpenImageDialogEventArgs> ShowingOpenImageDialog
vb
<DiagramCategory(DiagramCategory.DiagramItems)>
Public Event ShowingOpenImageDialog As EventHandler(Of DiagramShowingOpenImageDialogEventArgs)

Event Data

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

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
FilterGets or sets the string that determines the file filtering options that appear in the dialog.
ImageSourceToOpenGets 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.
InitialDirectoryGets or sets the path to the directory displayed by the dialog.
TitleGets 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

DiagramControl Class

DiagramControl Members

DevExpress.XtraDiagram Namespace