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
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