Multiple DockSites

Docking/MDI for WPF Forum

Posted 15 years ago by Christian G. Dietz
Version: 4.5.0485
Avatar
Hello, I'm currently evaluating your docking product and am having trouble determining if it can handle what I'm trying to do. I'm aware that what I'm asking is a little outside the box from the Visual Studio metaphor... but worth a shot. Essentially I have multiple windows in my app, each with a DockSite, a TabbedMdiHost, and several DocumentWindows laid out inside. This works great.
However I need some way to occasionally drag a DocumentWindow from one DockSite to the other. It is fine if I lose the blue layout preview pane, drop guides, etc. (though that would be nice). Is this possible? All the examples seem to require that a DocumentWindow be constructed with the DockSite predetermined and never changing, is it not possible to swap the DockSite out?

Thanks for the help, this is a really well done product.

Comments (5)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Christian,

Thanks for evaluating our product. Although we fully support nested dock sites, side-by-side dock sites, etc., we don't currently have a facility for dragging from one dock site to another.

We have had a customer in the past bring this up and what they ended up doing was customizing the right-click context menu of the tool window to add a menu item to switch to the other dock site. When that menu item was executed, they would Destroy the tool window (which just closes it and removes it from the DockSite) and would then add it to the ToolWindows collection of the other DockSite and Activate it. Perhaps that would work for you too?


Actipro Software Support

Posted 15 years ago by Christian G. Dietz
Avatar
The idea seems straight forward enough, I'll have to experiment and see if I can spoof this a little. Though I was trying to do this with DocumentWindows. So to be clear, you can destroy ToolWindows to unassign from a DockSite and reassign to a new DockSite via the Dock method. But you can not destroy DocumentWindows and add them to a new DockSite as there is no Dock method. Right?

Thanks again!
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I believe both document and tool windows have a Destroy() method you can call. All that does is close the window if it is open and then removes it from the DockSite.DocumentWindows or DockSite.ToolWindows collection. Then it is considered destroyed.

To add it to the second DockSite, just add your DocumentWindow to the second DockSite.DocumentWindows collection and call Open() or Activate() on the DocumentWindow. I believe that does the trick.


Actipro Software Support

Posted 15 years ago by Christian G. Dietz
Avatar
Speedy support, I love it! Yes that does do the trick. Thanks again for the help, I'll see if this gets me close enough.
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Christian,

We've added support for linked DockSites, which will be included in the next maintenance release.

If you'd like access to a preview build to help us test prior to the next maintenance release, please email support with your request.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.