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

New toolwindow docked in splitcontainer at runtime

2 Answers 89 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Boneshaker
Top achievements
Rank 1
Boneshaker asked on 12 Mar 2015, 02:36 PM
I have a scenario where I have a toolwindow docked on the left hand side of the document. I have a splitcontainer loaded just to the right of this. At runtime I am dynamically creating a new toolwindow and wish to position the new window at the top of the split containter, not the top of the document. I am using the following code to load the new toolwindow:

                ToolWindow windowPT = new ToolWindow();

                windowPT.Text = "PhoneTrak Dashboard";
                windowPT.Name = "twPhoneTrak";
                windowPT.DockState = DockState.Docked;

                rdMain.DockWindow(windowPT, DockPosition.Top);

Please see attached images for current placement vs. desired placement.

Thanks in advance!

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 17 Mar 2015, 07:51 AM
Hello Corey,

Thank you for writing.

To achieve the desired layout you should redock the first window:
private void radButton1_Click(object sender, EventArgs e)
{
    ToolWindow windowPT = new ToolWindow();
 
    windowPT.Text = "PhoneTrak Dashboard";
    windowPT.Name = "twPhoneTrak";
   
    radDock1.DockWindow(windowPT, DockPosition.Top);
    radDock1.DockWindow(toolWindow1, DockPosition.Left);
}

Let me know if you have additional 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.

 
0
Boneshaker
Top achievements
Rank 1
answered on 17 Mar 2015, 10:36 AM
Wow -- that was easy - I never thought to re-dock the original toolwindow!  Thanks!
Tags
Dock
Asked by
Boneshaker
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Boneshaker
Top achievements
Rank 1
Share this question
or