We have a TabGroupPane which allows the user to drag the tab out of the pane. The tab is rendered as the PaneToolWindow. If we double click on the header, it doesn't return back to the tab group pane. Is this possible?
The double click functionality works if the floating window didn't come from the TabGroupPane.
Double click will toggle between the Docked (i.e. docked to the left/right/top/bottom edge of the xamdockmanager) and Floating states. If the TabGroupPane was floating and you take a pane out then that is its new floating location and so double clicking would only between its floating state (by itself in that window) and its previous docked location. If it was never docked then the double click won't do anything. This is the expected behavior and would emulate what VS did (well VS 2008 and prior anyway since VS 2010 and later interpret double clicking the floating window caption as a signal to maximize the floating window).
If the TabGroupPane from which you removed the pane and floated it was docked then the double click should work and we can look at it if you have a sample.
Thanks for the quick response.
The double click doesn't "float" the selected tab. The TabGroupPane is always docked in the DocumentContentHost. We are able to drag and drop the Tabs (which renders as Floating windows during the dragging). The double click is the only pending functionality.
I tested the double click in another docking usage (non-tabgrouppane) and that works as expected. I am able to double click to float/dock the window. In the tabgrouppane, double click doesn't appear to work at all.
Code:
<igDock:DocumentContentHost x:Name="ContentHost" >
<igDock:SplitPane IsEnabled="True">
<igDock:TabGroupPane>
<igDock:ContentPane Header="A" CloseButtonVisibility="Collapsed" PinButtonVisibility="Collapsed" AllowClose="False" AllowDockingBottom="False" AllowDockingTop="False" AllowDockingLeft="False" AllowDockingRight="False">
<Border />
</igDock:ContentPane>
<igDock:ContentPane Header="B" CloseButtonVisibility="Collapsed" PinButtonVisibility="Collapsed" AllowClose="False" AllowDockingBottom="False" AllowDockingTop="False" AllowDockingLeft="False" AllowDockingRight="False">
</igDock:TabGroupPane>
</igDock:SplitPane>
</igDock:DocumentContentHost>
Double clicking only toggles between the Docked(Left|Right|Top|Bottom) and Floating states (since that is what VS 2008 and prior did). It does not toggle between a floating dockable state (i.e. Floating) or FloatingOnly state and the DocumentContentHost. I think the only way you might be able to acheive this is to derive from XamDockManager (be sure to read my post on the implications of inheritance on styling), override the CreatePaneToolWindow and return a new instance of your own class that derives from PaneToolWindow. Your derived PaneToolWindow will need to override the OnDoubleClickCaption method and perform whatever logic you want. In your case you'll probably need to traverse the panes within the SplitPane returned from the Pane property aand build a list of the ContentPane instances within. Once you have that list you can enumerate that list and call the ExecuteCommand of each pane with ContentPaneCommands.ChangeToDocument. It should be noted that the pane will not return to the previous location since VS didn't do that until VS 2010 and the control was developed before that point. Instead it will do what VS 2008 and prior did which is to add the pane into the TabGroupPane in the document area that contains the active document. If you want it to return to the previous position you would probably need to programatically remove it from its parent TabGroupPane or SplitPane and add it into the Items of the TabGroupPane at the desired location. You may also want to submit a suggestion for adding this functionality into the control.