views:

128

answers:

2

I've seen some nice Adobe AIR demos where a component of the application is dragged outside of the application and dropped onto the desktop and then continues to run in a new window. This seems to be facilitated by the NativeDragManager class.

Is there anything similar in WPF? How would you go about implementing this sort of functionality in WPF to allow a user control to be dragged to the desktop and then continue to run in a new window? This is great for multi-monitor scenarios and exactly what msft have added to vs2010.

Regards

pfaz

A: 

Would that help you: dragable panel

742
That helps but I'd like to know how to capture the drop and associated location info when the target is outside of your application. That's when you'd have to create your new window and position it on the desktop.
pfaz
I assume you can't use the drop event since the drop must be handled by the receiving application, here Explorer. What about starting the drag normally, capturing the mouse when the mouse goes outside the application windows. Isn't that possible then to wait for the mouse release event to know the position of the release action?
742
A: 

I don't know the answer to this, but Visual Studio 2010 uses WPF and lets you "drag & drop" the code tabs outside the main window. It looks like as soon as you drag it out they create a new window and follow the mouse, so it doesn't do it on "drop" specifically.

Nelson