Programatically resizing a ToolWindow after it's open

Docking/MDI for WPF Forum

Posted 9 years ago by FinallyInSeattle
Version: 10.1.0522
Avatar
Is there a way to programatically resize a ToolWindow after it's open? Or when it's opening? I've tried out DockSite.SetControlSize, but it seems to have no affect. I'm trying to size a docked ToolWindow so that the height initially causes all content to be visible.

Thanks in advance!

Comments (1)

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

The ControlSize property only works on the "containers". If you are creating a ToolWindow programmtically, you can create a ToolWindowContainer and add your ToolWindow to it. Then set the ControlSize on the ToolWindowContainer, and then dock the ToolWindowContainer.

After a ToolWindow is opened, the only way to resize right now is via SplitContainer.ResizeSlots(). This allows you to specify ratios for the various slots in the SplitContainers above the ToolWindow in the visual tree.

We have a few TODO items to make specifying sizes easier, which we hope to address after we get through a few other things.


Actipro Software Support

The latest build of this product (v2018.1 build 0675) 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.