This is a migrated thread and some comments may be shown as answers.

ToolWindow Pinned Size

1 Answer 100 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Kenneth
Top achievements
Rank 1
Kenneth asked on 15 Oct 2014, 07:58 PM
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.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 20 Oct 2014, 10:14 AM
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.

 
Tags
Dock
Asked by
Kenneth
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or