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

Move ToolWindow between RadDocking controls

4 Answers 114 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Marcel
Top achievements
Rank 1
Iron
Marcel asked on 08 Nov 2013, 04:28 PM
Hi,

I'm trying to create a window layout with a RadTabControl where the user can dynamically add RadTabItems. This is done MVVM style with a data bound itemssource inside the RadTabControl. Inside the bound items collection are viewmodels which are resolved to views by datatemplates. The views only contain a RadDocking with RadSplitContainer and RadPaneGroup. Now, the user can dynamically add more views of different types which are initialized as ToolWindows. These ToolWindows are created by the RadDocking which is currently selected in the RadTabControl. This makes the ToolWindow somehow depending on the specific RadDocking.

Problem: If the user opens a ToolWindow, changes the selected tab and then wants to dock the ToolWindow into the now selected RadDocking (which is not the parent of the ToolWindow), the ToolWindow docks into the parent RadDocking in the hidden tab. This only works because the RadTabControl has set "IsContentPreserved" to "true". If set to "false", the ToolWindows hide if the parent RadDocking is in a non-selected tabitem.

Workaround attempt: everytime the selected tabitem changes, I can iterate through all ToolWindows, remove the nested panes from their parents and add them to the RadDocking in the now selected tabitem. But the current docking state of the pane is lost in this process. It is docked into the RadDocking and not inside a ToolWindow anymore. I can make the pane float again and even restore the position and size of the ToolWindow that was previously hosting the pane. But...

Two problems with the workaround:
1) The ToolWindows flicker when changing the selected tab. It looks like it is closing and immediately reopening. Is there a better way to move a ToolWindow from one RadDocking to another?
2) What if I have multiple RadPanes docked and tabbed into one ToolWindow in certain way? I would have to move the RadSplitContainer from one RadDocking to another to preserve the complete layout. But RadSplitContainer is not offering a method like "RemoveFromParent"... I'm a little bit stuck here.

The most comfortable solution would be to change the parent of the ToolWindow to another RadDocking, but it doesn't look like this is possible in the current Telerik WPF release...

Thanks for any help in advance!

Regards,
Marcel

4 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 13 Nov 2013, 11:21 AM
Hi,

As we see that you have posted another support thread with ID: 757533 about the same issue could we continue the discussion there. I will post our response from that thread here too in order for it to be available for the community:

Unfortunately in the current version of RadDocking it is not possible to dock one Docking controls Pane/PaneGroup into another Docking control. We have logged this feature request in our Public Issue Tracker System where you can vote for it and track its status.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Paul
Top achievements
Rank 1
answered on 15 Feb 2014, 01:33 PM
Vladi

I am getting ready to start on a project where I will have multiple (N) Monitors.  I had planned on having a docking control on each monitor, and then allowing the user to move a pane from one monitor to another.  Is this possible, or will it require this fix to be in place?  Or is there an alternative strategy that would allow the same visual behavior but be implemented by me having to remove and then add the user control/templated object in the pane to the rad docking controls?  Can you point to any sample code that gives a start on a strategy or design for this?  If you would prefer this as a new topic, feel free to start it and point this link to it.

Thanks
Paul
0
Vladi
Telerik team
answered on 17 Feb 2014, 11:10 AM
Hello,

As previously mentioned achieving drag and drop between two separate RadDocking instance is not possible in the current version of the control.

Unfortunately implementing such functionality is not a simple task and there are many issues that could be hit along the way. Because the control is not a simple control and many of its parts are connected to each other by either being a parent or child, implementing such functionality where one Pane/Group is docked outside of its parent Dock borders is not a simple task.

Implementing such functionality is on our TODO list and if there is enough demand for it we will do our best to have it as a built-in functionality in the control as soon as possible. You can keep track of the feature request's status here.

Regards,
Vladi
Telerik

Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

0
Paul
Top achievements
Rank 1
answered on 17 Feb 2014, 03:44 PM
Thank you for the feedback.  I look forward to the release where this is possible.

Paul
Tags
Docking
Asked by
Marcel
Top achievements
Rank 1
Iron
Answers by
Vladi
Telerik team
Paul
Top achievements
Rank 1
Share this question
or