3 Answers, 1 is accepted
Thank you for writing.
This behavior is not directly supported. However, you can accomplish your task by using an Absolute size mode for each of the tool windows. A similar approach is demonstrated here: https://docs.telerik.com/devtools/winforms/dock/object-model/example-building-an-advanced-layout-at-runtime.
Please also check my code snippet below:
Bear in mind that with this approach you will be solely responsible for the sizes of the tool windows. You can further extend it to suit best your actual setup. I am also attaching a short video showing the result on my end.
I hope this helps. Should you have further questions please do not hesitate to write back.
I have a Raddock containing Documentcontainer, RadSplitWindow and many TooltabStrip. On a button click I want make equal size of windows.
With above code this is not possible as windows in same column should be considered as one.
Please how can i give equal width to all windows?
According to the provided screenshot, it seems that two of the ToolWindows are arranged vertically. This will calculate wrong width per window since these two windows share the same width but their height is twice smaller. There is not automatic API for handling this case and to be honest it wouldn't b easy at all to determine this.
Note that RadDock is actually a derivative of RadSplitContainer which hosts all windows in split panels. The split panel that contains the two vertically oriented ToolWindows actually contains another nested RadSplitContainer which contains two items in the Controls collection. Knowing this arrangement of the panels, you may iterate the RadDock.SplitPanels collection recursively in depth and see if there are any nested RadSplitContainers that host more than one ToolWindow. In general, to calculate the proper width per window, you need to know the total width of RadDock and the number of ToolWindows among which you need to distribute the width.
However, have in mind that it would probably require a lot of conditions and checks for the windows arrangement and after moving a window or redocking it to a new place, new split panels will be created in RadDock to host the window at its new position. This is a quite complex layout and it is performed over the current size of RadDock. That is why I would suggest you to think about the SplitPanelSizeMode.Relative where you can specify RelativeRatio. Then, whenever the size of RadDock changes, you can reset the sizing mode and assign a new ratio in order to calculate automatically the size. Additional information is available in the following help article: https://docs.telerik.com/devtools/winforms/controls/dock/object-model/example-building-an-advanced-layout-at-runtime
I hope this information helps.
Dess | Tech Support Engineer, Sr.