ToolWindow Pinned Size

2 posts, 0 answers
  1. Kenneth
    Kenneth avatar
    8 posts
    Member since:
    Jul 2010

    Posted 15 Oct 2014 Link to this post

    I have a set of tabbed ToolWindows that are initially hidden when my application starts.  When I hover over one of them, and then select to pin the windows, is there a way to specify the width, and/or height, that I want them to be when pinned?

    Thanks.

  2. Dimitar
    Admin
    Dimitar avatar
    1413 posts

    Posted 20 Oct 2014 Link to this post

    Hello Kenneth,

    Thank you for writing.

    It depends on how the windows are docked. If the windows are docked to top or bottom you can adjust their height, if they are docked to left or right you can adjust their width. For example you can initialize and then set the height of a tool window like this:
    void Form1_Load(object sender, EventArgs e)
    {
        ToolWindow windowTop = new ToolWindow();
        windowTop.Text = "Window 1";
        this.radDock1.DockWindow(windowTop, DockPosition.Top);
        windowTop.Hide();
     
        radDock1.DockStateChanged += radDock1_DockStateChanged;
    }
     
    void radDock1_DockStateChanged(object sender, DockWindowEventArgs e)
    {
        ToolWindow wnd = e.DockWindow as ToolWindow;
        wnd.TabStrip.SizeInfo.SizeMode = SplitPanelSizeMode.Absolute;
        wnd.TabStrip.SizeInfo.AbsoluteSize = new Size(0, 500);
    }

    Additional information is available here: Example: Building an advanced layout at runtime.

    Do not hesitate to contact us if you have other questions.

    Regards,
    Dimitar
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top