This is a migrated thread and some comments may be shown as answers.
Change dockposition in toolwindow
2 Answers 45 Views
This is a migrated thread and some comments may be shown as answers.
Fernan
Top achievements
Rank 1
Fernan asked on 14 Jul 2010, 09:36 AM
Hi,

I have two ToolWindows in a ToolTabStirp which in a DockContainer.

At first, I show to the user this tow ToolWindows as a TabbedDocument with dockposition in fill. But, my client want to have a button that when the user clicks on the button, the two ToolWindows are shown as a TabbedDocument but with dockposition in horizontal (top and bottom) or vertical (left and right).

I need to do this quickly.

I have used this code to do horizontal mode:

public void mostrarHorizontal()
       {
           this.DockContainer.DockControl(this.toolWindowComparacion, Telerik.WinControls.UI.Docking.DockPosition.Left, Telerik.WinControls.UI.Docking.DockType.Document);
           this.DockContainer.DockControl(this.toolWindowReference, Telerik.WinControls.UI.Docking.DockPosition.Right, Telerik.WinControls.UI.Docking.DockType.Document);
          
       }

When the user to do click the first time, it works fine, but in the second, third... time, it appear new toolwindows in the dockcontainer.

Thanks,


2 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 19 Jul 2010, 12:57 PM
Hi Fernan,

The general purpose of the DockControl method is to create HostWindows for controls docked in RadDock. For additional information, please refer to this article.

Since your ToolWindows are already part of RadDock, you do not need to redock them as controls. Instead, you should just change the dock position of the first ToolWindow in relation to the other ToolWindow:
toolWindowReference.DockTo(toolWindowComparacion, DockPosition.Right);

I hope this helps.

Sincerely yours,
Nikolay
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Fernan
Top achievements
Rank 1
answered on 19 Jul 2010, 01:02 PM
Hi Nikolay,

Thanks, this help me. Now, it works nice!

regards,
Tags
Dock
Asked by
Fernan
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Fernan
Top achievements
Rank 1
Share this question
or