Hello,
I seem to have an issue with the xamdockmanager. I can add documents with no problem with the .adddocument command, but the problem lies with going in and removing those documents.
I have a xamdatagrid that I use and, for example, if I have multiple rows I want to select I highlight them and click the "load case" button and for each row selected, it will load the primary key, find the document, and add it to the xamdockmanager. I then have that equalled to a contentpane. I also have the xamdockmanager.content = documentcontenthost. But I have not been able to find much infomation on that control. Is there a way to access the documents in the documentcontenthost or the xamdockmanager based on the header.
Thanks in advance,
Joel
You could maintain your own list of the ContentPanes you have created - the ContentPane is returned from the AddDocument or you can use the public GetPanes method on the xamDockManager to enumerate the panes within the xamDockManager. As to removing them you would want to set the CloseAction to RemovePane and then use the ExecuteCommand method with the ContentPaneCommands.Close to remove all references to the pane from the xamDockManager. You should probably build the list using the enumerator and then remove them after you have completed enumerating them.
Thanks for that bit of information that helped out quite a bit, and I'm alot further than I was yesterday. I now understand how to close the panes. But whats getting me is how to access a certain tab. For example say I have 3 tabs created from the xamdockmanager.adddocument and I want to delete the second tab. and I have focus on it. I noticed with the xamdockmanager.getpanes , I am able to get contentpanes I have created manually, but I am not able to access the contentpanes I created with the AddDocument command.
Thanks for your fast reply
I just tried it out and the enumerator returned by the GetPanes method does include all panes including those added with the AddDocument method. If that's not what you are seeing then I would recommend providing that sample to the support group so we can investigate the matter. If you just want to get to the containing ContentPane from a control that is within the pane then you can walk up the visual tree to get to it (e.g. using VisualTreeHelper.GetParent).