Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
Inconsistent docking behavior for document panes
posted

The layout below produces inconsistent results depending on whether documents are tabbed or floating. Select Document1, drag it to position it to the right of document2. Now you have two documents side by side. Fine!

Now float document1. Document 2 is still docked.

Now try to dock document1 to the right of document2 again. This is not possible. You have to first place document1 on top of document2.

If you remove AllowDocking=False, it's possible to dock Document1, but it is not docked in the documenthost in this case (it looks different from document2)

This behavior is inconsistent from a usage perspective. I should be able to dock panes in the location they came from, shouldn't I?

        <docking:XamDockManager>
 
            <docking:XamDockManager.Panes>
                <docking:SplitPane SplitterOrientation="Horizontal" Width="auto">
                    <docking:TabGroupPane>
                        <docking:ContentPane AllowInDocumentHost="False">
                            <Label Content="Left"/>
                        </docking:ContentPane>
                    </docking:TabGroupPane>
                </docking:SplitPane>
                <docking:SplitPane SplitterOrientation="Horizontal" docking:XamDockManager.InitialLocation="DockedRight" Width="auto">
                    <docking:TabGroupPane >
                        <docking:ContentPane AllowInDocumentHost="False">
                            <Label Content="Right"/>
                        </docking:ContentPane>      
                    </docking:TabGroupPane>
                </docking:SplitPane>
                <docking:SplitPane docking:XamDockManager.InitialLocation="DockedTop" Height="auto">
                    <docking:TabGroupPane>
                        <docking:ContentPane AllowInDocumentHost="False">
                            <Label Content="Top"/>
                        </docking:ContentPane>
                    </docking:TabGroupPane>
                </docking:SplitPane>
                <docking:SplitPane docking:XamDockManager.InitialLocation="DockedBottom" Height="auto">
                    <docking:TabGroupPane >
                        <docking:ContentPane AllowInDocumentHost="False">
                            <Label Content="Bottom"/>
                        </docking:ContentPane>
                    </docking:TabGroupPane>
                </docking:SplitPane>
            </docking:XamDockManager.Panes>
 
            <docking:DocumentContentHost >
                <docking:SplitPane>
                    <docking:TabGroupPane>
                        <docking:ContentPane Header="Document1" AllowDocking="False" AllowDockingFloating="True" CloseAction="RemovePane">
                            <Label Content="Document1"/>
                        </docking:ContentPane>
                        <docking:ContentPane Header="Document2" AllowDocking="False" AllowDockingFloating="True" CloseAction="RemovePane">
                            <Label Content="Document2"/>
                        </docking:ContentPane>
                    </docking:TabGroupPane>
                </docking:SplitPane>
            </docking:DocumentContentHost>
        </docking:XamDockManager>