Setting Initial Tool Window Size

2 posts, 0 answers
  1. erwin
    erwin avatar
    381 posts
    Member since:
    Dec 2006

    Posted 11 Jun 2009 Link to this post

    How can I set the initial Tool Window Size when I add a Tool Window to the Manager?
    I add first the Tools, then the Documents. The Tools should have a given Minimum Size if possible, the Documents then can adjust.

    In the old Docking System I had to use a workaround to set the Size, is that still required?

  2. Georgi
    Georgi avatar
    296 posts

    Posted 12 Jun 2009 Link to this post

    Hi Erwin,

    Thank you for your interest in the new RadDock.

    The layout system was completely revamped and entirely new semantic was introduced. Each SplitPanel has a member SizeInfo, which controls its size and position on the RadSplitContainer. When you have document tabstrips visible, they have SplitPanelSizeMode.Fill, which sets the underlying layout engine in a special mode, somewhat similar to the standard Windows Forms Dock layout but more extended to support nested containers and proportional shrinking whenever there is less available size than the required. So, in your case you may do the following:

    RadDock dock = new RadDock();  
    ToolWindow window = new ToolWindow("My Tool Window");  
    dock.DockWindow(window, DockPosition.Left);  
    DockTabStrip strip = (DockTabStrip)window.TabStrip;  
    strip.SizeInfo.AbsoluteSize = new System.Drawing.Size(100, 100); 

    The above code will make the toolwindow hosting tabstrip have a width of 100 pixels. To achieve different layout scenarios, you may use this approach to modify the SizeMode and set different size settings.

    Please, do not hesitate to contact us if you need further assistance.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top