SplitContainer, resize & ResizeSlots

Docking/MDI for WPF Forum

Posted 14 years ago by Steve py
Version: 10.2.0531
Platform: .NET 3.5
Environment: Windows XP (32-bit)
I was reading up on how to specify a size for a SplitContainer and tried a ResizeSlots() call from code-behind. This doesn't appear to be working in cases where an application starts up with ToolWindowContainer a Workspace containing an empty TabbedMDIHost. I specified a call to ResizeSlots(1,3) Expecting the tool window container to take 1/4 of the space. It resizes, but takes 1/2. I've tried various different settings and it always takes half.


<docking:SplitContainer x:Name="uxSplit" Orientation="Horizontal" >

<docking:ToolWindow x:Name="uiMenu" Title="Menu">
<domain:UIMenu MortgageSelected="UIMenu_MortgageSelected"></domain:UIMenu>

<docking:TabbedMdiHost x:Name="tabbedMdiHost" TabPlacement="Bottom">
<docking:TabbedMdiContainer x:Name="uxContainer">


Windows are added to the MDI container programatically based on navigation controls. (UIMenu)

I did find a work-around mentioned in other posts that worked for anyone having similar issues. I added docking:DockSite.ControlSize="300,100" to the ToolWindowContainer to force it to a width of 300. (The height of 100 is ignored since it's docked)
<docking:ToolWindowContainer docking:DockSite.ControlSize="300,100">

Still, I'd expect the call to ResizeSlots to work even if there is no active document or tool window in the secondary pane.

Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Steve,

If you call ResizeSlots before the SplitContainer is completely loaded, then it may not work. You may try dispatching the call, so it's guaranteed to occur after the SplitContaier is finished setting up.

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.