How to get the docking window conditions?

Docking/MDI for WPF Forum

Posted 6 years ago by Roger
Version: 13.2.0592
Avatar

We would like to control the docking window layout in Code.
We would like to restore the specific docking windows positions (not whole windows).
1. How to get docking group windows from the target docking window in Code?

2. How to get next window in a docking group for each direction?

Comments (5)

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Roger,

The "Control Hierarchy" topic in the documentation talks about the structure of controls in the DockSite and what can be in what.  The "Lifecycle and Docking Management" topic also covers the methods you can use to programmatically move docking windows around.  Check those out.

1) You can use the Dock method to dock against other docking windows or containers.  If you do Dock(otherToolWindow, Direction.Content) then it will become tabbed with the other target tool window.

2) Each docking window has a ParentContainer property that would be the parent "group" of docking windows.  You can look at that.  Or if you mean you want to get the next container, you'd need to look at that container's Parent and if it is a SplitContainer, look at the next container within that.


Actipro Software Support

Posted 6 years ago by Roger
Avatar

Thanks for answering.

I understood how to get the Control.

If I want to get the dock direction from ToolWindowContainer, should I rely on GetDirectionRelativeToWorkspace() method?

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

Hi Roger,

That will tell you the general direction that the container is docked relative to the Workspace.  So if you only care in general about if it's Left, Top, Right, or Bottom then that will do the trick.


Actipro Software Support

Posted 6 years ago by Roger
Avatar

Thnaks, Now I can get the Direction.

If I dock 2 tool windows from a right side of workspace, how to get the left window container from the most right side window?

This is the dock states figure.

Workspace | window1(docked from workspace) | windows2(docked from window1)

                                                                            I want to get the window1 DockingwindowContainer from window2 DockingwindowContainer.

                      

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

Hi Roger,

For that, you would need to do what we described in list item #2 in our original reply to this thread.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.