I have been trying to find a way around this for a while now but cannot seem to make the docking indicators work the way I want all the time.
I have this XAML in my window
<Dock:XamDockManager> <Dock:DocumentContentHost> <DockManager:SplitPane> <DockManager:TabGroupPane /> </DockManager:SplitPane> <DockManager:XamDockManager.Panes> <DockManager:SplitPane DockManager:XamDockManager.InitialLocation="DockableFloating" /> </DockManager:XamDockManager.Panes></Dock:XamDockManager>
In my program, I programmatically add ContentPane to the DocumentContentHost's TabGroupPane. When I go to drag that ContentPane out of the tab group, I only get the 4 edge DockingIndicator hints display: I cannot get the center document docking indictor to display.
If I drag the ContentPane out of tab TabGroupPane and let it float and then start to drag the floating window, I get the center indictor as well as the 4 edge indicators.
My main concern is if I only have one ContentPane in the XamDockManager and I want to dock it outside of the tab group, I have to drag it to a floating window first and then I can create a new non-TabGroupPane dock. I'd rather have that option without having to create a floating window first.
(I've included screen shoots of the process I'm talking about)
I'd really appreciate any ideas where I might be falling down or not understanding the mechanics of how and why the docking indicators display the way they do when dragging a ContentPane out of TabGroupPane buried under the DocumentContentHost.
Thanks in advance
Hello, I'm having the same problem with undocking a documentPane from the DocumentContentHost and only beeing able to re-dock it after letting go of the pane. I can't undock the document and re-dock it in one go.
Did anything change for this behaviour? Is it now possible to enable it somehow or is it still not possible?
Thanks for the detailed answer. Helps a lot in understanding how best to use it.
Butch Rosecrans said:If I drag the ContentPane out of tab TabGroupPane and let it float and then start to drag the floating window, I get the center indictor as well as the 4 edge indicators.
The 4 global docking indicators are scoped based on the context of the pane you are dragging. So if you are dragging a pane within the DocumentContentHost then those global docking indicators are for creating new outermost root splits within the DocumentContentHost (i.e. a SplitPane within the DocumentContentHost that is sibling to the current split panes within the DocumentContentHost). When you are dragging a dockable pane (i.e. a pane docked to the left,right,top,bottom or in a dockable floating state) then the global indicators are for creating new outermost root SplitPane docked within the xamDockManager (so a SplitPane in the xamDockManager's Panes collection that is outside the existing split panes.
Butch Rosecrans said: In my program, I programmatically add ContentPane to the DocumentContentHost's TabGroupPane. When I go to drag that ContentPane out of the tab group, I only get the 4 edge DockingIndicator hints display: I cannot get the center document docking indictor to display.
The center docking indicator is based upon what you are dragging over and also where you are dragging from. If you are dragging a dockable pane (again one that is docked left,right,top,bottom or dockable floating), and you drag over any other dockable pane and you will get the center indicator so that you can position the panes being dragged to the left/right/top/bottom of the pane you drag over or over the center to add to/create a tab group with the panes being dragged and the you drag over. When you drag a dockable pane over the documentcontenthost, we show the center docking indicator wherever you are over the document content host so you cannot drag into a specific document in a single operation. This was required to mimic VS behavior whereby you can create a new root split pane that is immediately adjacent to the document area.
Dragging a pane within the DocumentContentHost is different. First, VS has no functionality for dragging out of the document area. We not only support that but we also support being able to created nested groups (VS only allows the document groups to be in a single orientation). So when you drag a document contentpane over any other contentpane within the documentcontenthost we show the center indicator because you can reposition the drag pane relative to that pane (above/below/right/left) or over the central portion to add it to that tab group. We also allow you to drag over any existing content pane outside the document area and we will give you the center indicator so you can immediately drag out of the document area relative to another pane. Since we show a center indicator when over another pane in the document area, the center indicator cannot be use to position a pane relative to the documentcontenthost itself.
Perhaps a future version of the control will support the VS 2010 style center indicator which has multiple options (up to 2 left, 2 right, 2 top, and 2 bottom) so that when you drag a document over another pane within the document area you will get a center indicator which not only lets you create nested document groups but also allows you to create docked split pane adjacent to the document content host. You may want to submit a suggestion for adding this.
BTW, the reason you don't see a center indicator when you have 1 pane within the documentcontenthost is because all of the options of the center indicator would be a visual no op when you released. It would be inconsistent to the end user to treat that case specially and show a center indicator that could created docked split but if they had 2 document panes they could only create document splits.