Change dockposition in toolwindow

3 posts, 0 answers
  1. Fernan
    Fernan avatar
    15 posts
    Member since:
    May 2010

    Posted 14 Jul 2010 Link to this post


    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.


  2. Nikolay
    Nikolay avatar
    1805 posts

    Posted 19 Jul 2010 Link to this post

    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,
    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
  3. Fernan
    Fernan avatar
    15 posts
    Member since:
    May 2010

    Posted 19 Jul 2010 Link to this post

    Hi Nikolay,

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

Back to Top