Dirkster99 / AvalonDock

Our own development branch of the well known WPF document docking library
Microsoft Public License
1.39k stars 318 forks source link

Empty document panes are not removed in non-floating windows #450

Open fredriks123 opened 1 year ago

fredriks123 commented 1 year ago

When documents are placed side by side (creating multiple panes) as below:

image

And any of the documents are made floating, the empty pane is not removed during LayoutRoot.CollectGarbage:

image

This works fine if the same thing is done in a floating window. I believe this is due to the fact that for content that is floating during LayoutRoot.GarbageCollect, the PreviousContainer is not cleared. This check does not take into account that the content has already been placed in a floating window when CollectGarbage is executed.