Hey,
I have a few questions related to adding and removing content panes:
What is the best way to programmatically add a content pane as a tabbed document? Currently i have a SplitPane with a TabGroupPane set up in my xaml. When I want to add a new content pane in code I just do something like defaultTabGroupPane.Items.Add(myContentPane). Is see that there is a method exposed on the xam dock manager to add documents, should I be using the method instead?
Is there a way to programmatically add a content pane to the same tab group as an existing content pane? ie somehow determine where the existing content pane is and add another pane to that location? Can it be done both when the existing pane is a tabbed document and when the pane is a dockable, floating tool window?
Is using the ContentPaneCommands.Close command the best way to programmatically remove a content pane from the dock manager?
Thanks
jlotridge said:What is the best way to programmatically add a content pane as a tabbed document? Currently i have a SplitPane with a TabGroupPane set up in my xaml. When I want to add a new content pane in code I just do something like defaultTabGroupPane.Items.Add(myContentPane). Is see that there is a method exposed on the xam dock manager to add documents, should I be using the method instead?
Its up to you. If the TabGroupPane has a name then it will remain in the tree even if the end user moves all the panes out of it so you can add to it but the other documents may have been moved. The AddDocument method follows VS' behavior of adding the document to the beginning of the tab group that contains the active document.
jlotridge said:Is there a way to programmatically add a content pane to the same tab group as an existing content pane? ie somehow determine where the existing content pane is and add another pane to that location?
jlotridge said:Can it be done both when the existing pane is a tabbed document and when the pane is a dockable, floating tool window?
jlotridge said: Is using the ContentPaneCommands.Close command the best way to programmatically remove a content pane from the dock manager?
Andrew Smith"]I'm not exactly sure I follow this question. If you mean that it should be a sibling of the pane whereever it has been (i.e. if its been floated and its currently docked to the left that it be a sibling of it when its floated and a sibling in its docked position) then no there is currently no way to do this.
For this I was thinking of how in VS I can make both my solution explorer and team explorer dockable and then nest them in the same floating window (it makes tabs on the bottom). I was curious if I could add a sibling to a content pane that is dockable and floating on the screen. I think that the approach where I would have to check the parent and add to it would work here too?