Skip to main content

RepositoryItemPictureEdit.ImageSaving Event

Allows you to execute actions when a user saves the current image via the control’s context menu. You can handle this event to perform image preprocessing or to save the image to a custom image format.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

[DXCategory("Events")]
public event ImageSaveEventHandler ImageSaving

Event Data

The ImageSaving event's data class is DevExpress.XtraEditors.Repository.SaveLoadImageEventArgs.

Remarks

The ImageSaving event fires after the user confirms a file name in the ‘Save File’ dialog. This event has the following arguments:

  • FileName - Returns the full file name selected in the dialog.
  • Image - Returns the current image (a System.Drawing.Image object). You can pre-process this image, convert this image to a custom image format, and save it to the specified file. Set the e.Handled event parameter to true to indicate that the image was saved.
  • Handled - Set this parameter to true if you saved a file. If this parameter is set to false, the PictureEdit control attempts to save the image in the format a user selects in the dialog.

See the RepositoryItemPictureEdit.ImageLoading topic for more information.

See Also