This project is read-only.

Duplicates in DockingManager.DockableContents

Nov 15, 2008 at 9:08 AM

As I can see, in public DockableContent[] DockableContents there's one strange behaviour:

  get
{
List<DockableContent> contents = FindContents<DockableContent>();

foreach (FloatingWindow flWindow in _floatingWindows)
{
foreach (DockableContent content in flWindow.HostedPane.Items)
contents.Add(content);
}

foreach (DockableContent content in _hiddenContents)
contents.Add(content);

return contents.ToArray();
}

If content becomes floating, it still present in FindContents<DockableContent>(), and foreach (FloatingWindow flWindow in _floatingWindows) inserts it into contents again. So, it presented in DockableContents twice. Imho it is wrong behaviour.

Nov 15, 2008 at 9:11 AM

internal List<T> FindContents<T>() where T : ManagedContent

also haves this code:

 foreach (FloatingWindow flWindow in _floatingWindows)
{
foreach (ManagedContent c in flWindow.HostedPane.Items)
{
if (c is T)
resList.Add(c as T);
}
}

so code in DockableContent[] DockableContents is duplicate.