Docking assistant must be used twice

3 posts, 0 answers
  1. stealthsid
    stealthsid avatar
    21 posts
    Member since:
    Oct 2006

    Posted 08 Jul 2008 Link to this post

    I have a DockPanel, created at runtime, which contains a user control with its own DockingManager and DockPanel layout. If I float any of the child DockPanels and then try to reattach them to their original location I have to perform the operation twice. The first time the window moves near the button on the assistant, and the second time it actually locks into place.
  2. stealthsid
    stealthsid avatar
    21 posts
    Member since:
    Oct 2006

    Posted 08 Jul 2008 Link to this post

    Some additional details. This is part of my "persist to disk" effort, and the issue only seems to occur when I have panels that are converted from docked to floating at runtime. By default, according to the design-time layout, all child DockPanels are docked. Any panel that remains docked (after the runtime determines the user's previous settings) will work fine. It can be made to float and then re-docked without any problems.

    The problem arises if the runtime undocks a panel. Here is the code it's using to undock the panel:

        this.DockState = Telerik.WinControls.Docking.DockState.Floating;
        this.DockingSite.HostForm.Top = details.Location.Y;
        this.DockingSite.HostForm.Left = details.Location.X;
        this.DockingSite.HostForm.Size = details.Size;

    Any thoughts on why this code block would cause the DockingAssistant to require multiple attempts to redock correctly?

  3. DevCraft R3 2016 release webinar banner
  4. Julian Benkov
    Julian Benkov avatar
    1135 posts

    Posted 11 Jul 2008 Link to this post

    Hi Sid,

    This behavior is related to the floating logic in the current implementation of RadDock. When you float an IDockable window, it is detached from its docking container, and is recreated as a new on host Form object. After this operation, the previous state is not persisted. If you change the DockState the IDockable window is docked as if it was a new one. The state of the IDockable window can currently be restored only for Hide/Show operations.

    We are planing to redesign this behavior in our next major version to the RadDock component, planed for Q3 2008.

    Thank you for the reported issue. Your Telerik points have been updated.

    Julian Benkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top