ListView.ItemDrag Event
Occurs when the user begins dragging an item.
[Visual Basic] Public Event ItemDrag As ItemDragEventHandler [C#] public event ItemDragEventHandler ItemDrag; [C++] public: __event ItemDragEventHandler* ItemDrag;
[JScript] In JScript, you can handle the events defined by a class, but you cannot define your own.
Event Data
The event handler receives an argument of type ItemDragEventArgs containing data related to this event. The following ItemDragEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| Button | Gets the name of the mouse button that was clicked during the drag operation. |
| Item | Gets the item that is being dragged. |
Remarks
The ItemDrag event occurs when the user begins dragging an item. Typically the event handler for the ItemDrag event performs the task of dragging by calling the Control.DoDragDrop method. You can use this event to perform the tasks necessary to drag items into and out of your application's ListView control.
For more information about handling events, see Consuming Events.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
ListView Class | ListView Members | System.Windows.Forms Namespace | OnItemDrag | ItemDragEventHandler