user38349
user38349

Reputation: 3025

How Do You Create A Panel in WPF that Can Be Dragged Outside the Main Window?

Trying to replicate the docking controls in Visual Studio 2008. My application replays the RADAR environment for the FAA and I want the ability for dual monitor users to drag the control panels to the other monotor to leave the main canvas clear. This functionality is similar to the way the different panels in VS can be dragged outside of the main window.

Thanks,

Dave

Upvotes: 1

Views: 1266

Answers (1)

dthorpe
dthorpe

Reputation: 36082

Child controls can't exist as top-level windows on their own. They need a window to carry them around.

The general technique for this sort of thing is that you have to create an instance of a new top-level window (WPF Window) when the drag action begins, remove (or clone) the target control from its original window and insert it into the new floating window.

Upvotes: 2

Related Questions