Appendix E. Drag and Drop

NO MATTER WHAT KIND OF CONTROLS you're using or building, you often want to allow users to drag data from one and drop it on another. The communication protocol that supports this, known as drag and drop, has long been standardized and is fully supported in Windows Forms for both drag sources and drop targets. Additional support exposed by the TreeView and ListView controls provides a solid platform for building applications that exhibit behavior consistent with Windows Explorer.

Enabling Drag and Drop

Drag and Drop operations involve two elements: the drag source and the drop target.

The Drag Source

You initiate a drag-and-drop operation from a drag source, the control that contains the source data. This requires ...

Get Windows Forms 2.0 Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.