I have a simple XDM with a DocumentContentHost, SplitPane, and TabGroupPane. If I programmatically add a ContentPane to the TabGroupPane, then drag it to float (I believe you call this a ToolWindow), and then dock it again (to the right), why when I iterate the XDM.Panes collection is that docked SplitPane in the collection twice? The first reference has a location of Floating (via GetPaneLocation), and the second DockedRight.
I came upon this when I wanted to iterate panes and determine if any were floating. Is GetPaneLocation the most straightforward way? Google produced a link to some documentation with an IsFloating property, but that property appears to be obsolete.
I'm using 12.1. Thanks.
Hello Darryl,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
You may disregard my last statement, since after playing with the caption doubclick, and re-reading your post, I see that at most I would have two splitpanes for a contentpane repeatedly docked and floated. No root "pain", actually very cool.
Thank you for the detailed answer. This is indeed a very complex component. Your answer further explains why I was able to add a new contentpane to the floating splitpane, then invisible, and it again became visible, afloat with the new contentpane. Didn't know about the double-click functionality. I'll have to check that out.
I am however now wondering about resource consumption, given the fact that I've designed my app to allow numerous panes to be floated/docked at will.
Best,
Darryl
This is actually the correct and expected behavior. SplitPane and TabGroupPane instances are never moved. So when you drag one of your ContentPane instances from the DocumentContentHost (or more accurately out from within a TabGroupPane within the DocumentContentHost) to be floating, a new SplitPane is created and added to the Panes collection of the XDM. It's PaneLocation is Floating and it contains a ContentPane. When you then drag that ContentPane to be docked to an edge of the XDM, a new SplitPane is created (since the pane isn't being dragged into an existing docked SplitPane or TabGroupPane) and added to the Panes collection. The floating SplitPane remains. It actually contains a ContentPanePlaceholder; i.e. a special element that represents where the pane would be when it is toggled back to the floating state. So for example, if you double click on the caption of that pane, it will toggle back to that floating splitpane and the SplitPane will be displayed. The docked SplitPane would remain and it would contain a ContentPanePlaceholder whose Pane was that ContentPane. That would remain there until it was no longer needed - e.g. if you drag that floating ContentPane to be docked somewhere else within the XDM. The public GetPanes method that Stefan mentioned is the recommended means of enumerating the ContentPane instances that exist within the XamDockManager. You may also enumerate the Panes collection of the XDM and down into the descendant elements but then you must be aware that you can encounter SplitPane, TabGroupPane, ContentPane or ContentPanePlaceholder instances.
Thank you for the inforamtion. I was able to reproduce the behavior you described and I can say that this is a known issueand our developers are aware of it.