ToolWindow Drag and Drop in DocumentWindow with nested DockSite

Docking/MDI for WPF Forum

Posted 2 years ago by Kim Jiho - Ansys
Version: 22.1.3

Hello, this is a complex issue to explain.

We have a nested DockSite in DocumentWindows(Tabbed MDI) and create a ToolWindow in it.

Nested DockSites are LinkDockSite, so we can drag ToolWindow and move to another DockSite.


We want to drag "View 1" and drop it to "DockSite 2" in the same state as the linked image.

To do this, "DockSite 2" must be actived when drag "View 1" and drag over to "DockSite 2".

But that's not how it doesn't work. How do we approach this?

For your understanding, I also attach a link to the example source.



Comments (3)

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA


Tabs are not normally selected while dragging docking windows around (before releasing the drag), as that would be confusing for the end user, especially when drag drop targets and dock guides are showing for the movement.

That being said, I understand how in this nested/linked dock site setup you have, you would want the ability to do that.  Unfortunately nothing is built in to support that at this time.

In the next build, we will add a new protected virtual DockSite.NotifyWindowDragMove(Point location) method that will receive a screen coordinate as the pointer moves during a docking window drag operation.  You will be able to override that on DockSite and add your own logic, but be sure to call the base method implementation first since it controls the dock guides, etc.  This will at least give you an extension point for where you can plug in logic to implement what you're trying to do.

In your NotifyWindowDragMove logic, you could take that Point location and do some WPF Visual hit testing on your end to see if you are over a tab that requires selection and then programmatically select it.

Actipro Software Support

Posted 2 years ago by Kim Jiho - Ansys

Hello, I'm happy to hear good news.

Can you tell me the approximate schedule when the next update will be?

Thank you for the good feedback and have a happy day.

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA

We don't yet have a target date for the next release as we are still collecting changes.  It will probably be in November or December.  If you'd like to test a build earlier than that, you can write out support address to request a preview build.

Actipro Software Support

The latest build of this product (v24.1.2) 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.