How to distribute sizes of existing docked windows evenly after docking a new one?

Docking/MDI for WPF Forum

Posted 1 month ago by Alexander Polyansky
Version: 21.1.0
Avatar

I'm looking at Docking/MDI / QuickStarts sample, "Tabbed MDI-Only".

When I drag the first tab to tile it at the right, I get two tiles with evenly distributed widths.

When I drag the second tab and, again, I'm trying to dock it at the right, I get three tiles with width ratio of 1:1:2. I guess this is because the tab that I've dragged preserves its original width, while the tabs on the left each reduce their width equally to give space.

Again, when I drag the third tab from the left to become the 4th tile on the right, I see that it preserves its width, while the rest tabs each lose their widths evenly to make space for a new docked window.

The same behavior applies to the heights.

Now, what I'd like to have is the equal widths (heights) for all docked windows automatically, each time I dock a new one. So that the ratio would be 1:1:1 and 1:1:1:1 in my examples above, right after placing a new window.

Is there something out-of-the-box for this? Or should I recalculate and apply all widths manually, in my own code?

Thank you.

Comments (1)

Posted 1 month ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Yes that is correct.  When you drag and dock a docking window around, it attempts to preserve its prior width or height, depending on dock side.  We don't have anything that would resize the the docked windows after a drag.  You would need to programmatically do that.  Our "Programmatic Sizing" QuickStart shows an example of that.


Actipro Software Support

The latest build of this product (v24.1.2) was released 3 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.