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 post. I have been looking into it and I created a sample project following your scenario and by using XDM’s GetPanes method everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Looking forward for your reply.
Hi Stefan, thanks for the response. Please change button2_Click to count the Panes collection, to see root panes:
MessageBox.Show(xamDockManager1.Panes.Count().ToString());
Then, drag one ContentPane to float, and click button2 and see count 1. Then drag it back and dock it on the right and click button2 again, to see count 2. If you were to get the location on each of those, you would see "Floating" and "DockedRight" respectively, but they appear to refer to the same SplitPane. It's as if there's a latent reference to the SplitPane when it was floating, though now docked.
This is not a show-stopper for me. I can get what I want other ways, but it does make me curious, and I thought you guys might want to know about it.