How to set the size of SplitContainer?

Docking/MDI for WPF Forum

Posted 12 years ago by zhouxu
Version: 10.1.0523
I have the following code:

<docking:SplitContainer Orientation="Horizontal">


And I want to set the initial with of toolWindowContainer and Workspace to 20% and 80% of the entire width. How can I do it? Thank you!

Comments (1)

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

Currently, you can only perform percentage based sizing by leveraging the SplitContainer.ResizeSlots method. The Programmatic Resizing QuickStart shows an example that favors the Workspace. Specifically, then method OnLayoutEvenlyDistributeFavorWorkspaceMenuItemClick will calculate ratios that give the Workspace more room. You should be able to use a similiar method in your code when loading. You can also alter the ratios to be 2 and 8, instead of 1 and 3.

Actipro Software Support

The latest build of this product (v22.1.3) was released 21 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.