How set ToolWindow SizeToContenet in Docked mode?

Docking/MDI for WPF Forum

Posted 8 years ago by Arthur
Version: 11.1.0542
Avatar
Hi,
I create toolwindows programmatically then open/close by toggle buttons in Dock state.
I need to set toolwindow size to fit content size(at least Width), when its Activated.
Any idea?

Comments (3)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Arthur,

That is not currently supported. I think the only way to accomplish this is to do something like what the Programmatic Resizing QuickStart does. But you'd use the DesiredSize.Width of the parent ToolWindowContainer to determine the size of it's slot.


Actipro Software Support

Posted 8 years ago by Arthur
Avatar
will you please put more details regarding this,
code statements will be great addition.
thank you in advance.
Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Arthur,

The Programmatic Resizing QuickStart shows how you can use the SplitContainer.ResizeSlots method to resize various elements. There isn't a simple call to ensure a ToolWindow is a given width/height at this time. You'd need to manually resize the slots of all the SplitContainers that contain the ToolWindow/ToolWindowContainer, as there could be several ancestor SplitContainers. Again, this is shown in the sample.


Actipro Software Support

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