The dbicExplorerBar control supports dragging of objects through DragOut event and DoDragDrop method. To implement dragging of objects from the control call the DoDragDrop method in the DragOut event. The DoDragDrop method of the control is used to set the host form into drag mode and set the drag data to the object being dragged from the control. NOTE: If the object being dragged is a list item, the e arguments passed into the DragOut event expose the list (ListIndex) and Item (ItemIndex) of the object being dragged.
Example:
VB.NET
Private Sub dbicExplorerBar_DragOut(ByVal sender As Object, ByVal e As _ Dbi.WinControl.ExplorerBar.DragOutEventArgs) Handles dbicExplorerBar.DragOut
'This event fires when an object is dragged out of the dbicExplorerBar control
Dim DbiExplorerItem As Dbi.WinControl.ExplorerBar.dbiExplorerItem
'Create an instance of the item being dragged
DbiExplorerItem = dbicExplorerBar.Lists(e.ListIndex).Items(e.ItemIndex)
'Sets the form into drag mode and the data of the drag to the item being dragged from the
dbicExplorerBar control.
dbicExplorerBar.DoDragDrop(DbiExplorerItem, DragDropEffects.Copy)
End Sub
C#
private void DbicExplorerBar_DragOut(object sender, Dbi.WinControl.ExplorerBar.DragOutEventArgs e)
{
//This event fires when an object is dragged out of the dbicExplorerBar control
Dbi.WinControl.ExplorerBar.dbiExplorerItem DbiExplorerItem = new _
Dbi.WinControl.ExplorerBar.dbiExplorerItem();
//Create an instance of the item being dragged
DbiExplorerItem = dbicExplorerBar.Lists[e.ListIndex].Items[e.ItemIndex];
//Set the form into drag mode and the data of the drag to the item being dragged from the
dbicExplorerBar control
dbicExplorerBar.DoDragDrop(DbiExplorerItem, DragDropEffects.Copy);.
}