This project has moved. For the latest updates, please go here.

Floating Layout Anchorable throws exception with two DockingManager

May 13, 2016 at 1:43 PM
I'm using AvalonDock with a main DockingManager, with a layout structure like this:
<avalonDock:LayoutPanel Orientation="Horizontal">
       <avalonDock:LayoutAnchorablePane>
               <avalonDock:LayoutAnchorable>
                          <userControlA></userControlA>
               </avalonDock:LayoutAnchorable>
       </avalonDock:LayoutAnchorablePane>
       <avalonDock:LayoutAnchorablePane>
               <avalonDock:LayoutAnchorable>
                          <userControlB></userControlB>
               </avalonDock:LayoutAnchorable>
        </avalonDock:LayoutAnchorablePane>
        <avalonDock:LayoutAnchorablePane >
                <avalonDock:LayoutAnchorable >
                           <userControlC></userControlC>
                </avalonDock:LayoutAnchorable>
        </avalonDock:LayoutAnchorablePane>
 </avalonDock:LayoutPanel >
UserControlB contains another DockingManager that contains a LayoutDocumentPaneGroup. In this scenario floating the LayoutAncorable of userControlA (or C) throws an exception : "Invalid window handle", instead floating the LayoutAncorable of userControlB doesn't.
Did someone has encountered this ( or a similar ) issue? Debugging the source code of AvalonDock I noticed that it seems a solution to comment the if statement inside the WndProc function in LayoutAutoHideWindowControl class. It's a save operation?

P.S. If userControlB doesn't contain a DockingManager the exception is not thrown