←Select platform

ItemDragDrop Event

Summary

Occurs when data is being dragged or dropped from/to this ImageViewer.

Syntax
C#
C++/CLI
public event EventHandler<ImageViewerItemDragDropEventArgs> ItemDragDrop 
public:  
   event EventHandler<Leadtools::Controls::ImageViewerItemDragDropEventArgs^>^ ItemDragDrop 
Remarks

For more information refer to Image Viewer Drag and Drop.

Example
C#
using Leadtools; 
using Leadtools.Controls; 
using Leadtools.Codecs; 
using Leadtools.Drawing; 
 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Color; 
 
_imageViewer.InteractiveModes.BeginUpdate(); 
ImageViewerDragInteractiveMode dragMode = new ImageViewerDragInteractiveMode(); 
dragMode.AllowedEffects = DragDropEffects.Copy | DragDropEffects.Move | DragDropEffects.Link; 
_imageViewer.InteractiveModes.Add(dragMode); 
_imageViewer.InteractiveModes.EndUpdate(); 

This example will show how to use the ImageViewer as the drop target of a drag/drop operation.

Start with the ImageViewer example, remove all the code inside the example function (search for the "// TODO: add example code here" comment) and insert the following code:

Event Data
ParameterTypeDescription
senderobjectThe source of the event.
eImageViewerItemDragDropEventArgsThe event data.
Requirements

Target Platforms

Help Version 22.0.2023.1.24
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.