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

Docking assistant must be used twice

2 Answers 78 Views
Dock
This is a migrated thread and some comments may be shown as answers.
stealthsid
Top achievements
Rank 1
stealthsid asked on 08 Jul 2008, 03:26 PM
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 Answers, 1 is accepted

Sort by
0
stealthsid
Top achievements
Rank 1
answered on 08 Jul 2008, 05:26 PM
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?

Sid
0
Julian Benkov
Telerik team
answered on 11 Jul 2008, 11:38 AM
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.

 
Regards,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Dock
Asked by
stealthsid
Top achievements
Rank 1
Answers by
stealthsid
Top achievements
Rank 1
Julian Benkov
Telerik team
Share this question
or