Alin Constantin at Microsoft helped me here and even wrote a blog post on how to make the drag and drop in VS2010 right!
http://alinconstantin.blogspot.com/2010/02/drag-and-drop-in-visual-studio-2010.html
Highlights if the link rots:
In the (UserControl) tool window OnDragEnter, override OnDragOver(important!) And OnDrop. Failure to override OnDragOverwill cause the drag to fail.
In OnDragEnterfollow these steps:
- Check if you can handle the frame
- If so, set
DragEventArgs.Handledto trueand DragEventArgs.Effectsto the appropriate value - Call
base.OnDragEnter()
OnDragOver OnDragEnter. Handled, Visual Studio , !
OnDrop,
DragEventArgs.Handled truebase.OnDrop()
, OnDragOver , Visual Studio , OnDrop.