Won't Fix
Last Updated: 31 May 2016 08:37 by ADMIN
ADMIN
George
Created on: 28 Mar 2014 16:20
Category: Docking
Type: Bug Report
0
Loading Docking with PanesSource bound duplicates the panes.
The Docking control must be placed inside DataTemplate.

Also it is possible to reproduce this behavior by executing this process:
  - Load a previously saved layout into the RadDocking control (note that the PanesSource is not set)
  - Set a PanesSource collection. Here the PanesSource objects are correctly added to the control but the previous items from the loaded Layout are not removed.
1 comment
ADMIN
Nasko
Posted on: 31 May 2016 08:36
Hi,

When PaneSource gets set RadDocking does not clear the previous RadPanes from the loaded layout which causes the observed behavior. We suggest when PaneSource is used to clean the current layout of the Docking control whether it is set through XAML or is loaded using the Save/Load Layout mechanism:

//Clear All Panes including ToolWindows
for (int i = this.Docking.Panes.Count() - 1; i >= 0; i--)
{   
    var pane = this.Docking.Panes.ElementAt(i) as RadPane;
    pane.RemoveFromParent();
}

//Clear All SplitContaines
for (int i = this.Docking.Items.Count - 1; i >= 0; i--)
{
    this.Docking.Items.RemoveAt(i);
}

//Clear DocumentHost if Docking has such
if(this.Docking.HasDocumentHost)
{
    this.Docking.DocumentHost = null;
}

Regards, 
Nasko