This example demonstrates how to drag images from Windows Explorer onto the WinForms PictureEdit. The example creates a DragDropProvider
class and calls its EnableDragDrop
method:
private void OnLoad(object sender, EventArgs e) {
provider = new DragDropProvider(pictureEdit1);
provider.EnableDragDrop();
}
The example also demonstrates how to drag and drop images displayed on buttons.
private void OnSimpleButtonMouseDown(object sender, MouseEventArgs e) {
SimpleButton btn = sender as SimpleButton;
pictureEdit1.DoDragDrop(btn.Image, DragDropEffects.Copy);
}
- DragDropProvider.cs (VB: DragDropProvider.vb)
- Main.cs (VB: Main.vb)
(you will be redirected to DevExpress.com to submit your response)