Hi
I have a XamDockManager and within it a DocumentContentHost, which has a SplitPane and this SplitPane has a TabGroupPane.
I am able to add content panes within this TabGroupPane programatically. Then user closes (hides) a content pane. I have unique tag for each new content pane added to TabGroupPane. I am able to unhide by setting its visibility to visible and calling activate method. I reference this by looping through GroupPane's Items list.
However when user un-docks a pane and re-dock to make a new group at runtime and I am not able to access panes anymore. How can I make one of those content pane visible when these are not in same TabGroupPane anymore.
Is there an API which can return me content pane within a XamDockManager (at run time it could be in any split pane, tab group etc) by the tag or name?
I have given up on looping through XamDockManager.Panes collection as it contains split panes, tabgroup pane and content panes and there are far two many conditions needed to be coded which may cause problem in future.
I tried with both built in methods, however FindName returns null always although pane with given name exists in the collection. However I am able to use XamDockManager.GetPanes(PaneNavigationOrder.ActivationOrder) successfully. Thank you.
Hello Abs,
I find it likely that after you re-dock your pane, you are likely placing it somewhere within the XamDockManager.Panes collection, rather than it being in the DocumentContentHost. You can recursively loop through this XamDockManager.Panes collection, but the XamDockManager has a couple of built in methods that may help you to find your panes regardless of their location in the manager.
The first thing I would recommend is to use the XamDockManager.FindName method. This method takes a string parameter, and if you pass in the corresponding Name of one of your ContentPanes, it should return it.
Alternatively, you could make a call to XamDockManager.GetPanes, which will return you all of the panes in the XamDockManager in an IEnumerable collection. You could then query this collection and look for a pane that exists with your tag or name.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer