Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
955
How to remove a number of document content pane programatically?
posted

Hi, sorry if this is a repeated question.

I have a XamDocManager with below layout (simplified). I have one split pane on the left and many document content panes on the right.

             <igDock:XamDockManager>
                <igDock:XamDockManager.Panes>
                    <igDock:SplitPane>
                        <igDock:ContentPane>
                            <igDP:XamDataGrid>
                            </igDP:XamDataGrid>
                        </igDock:ContentPane>
                    </igDock:SplitPane>
                </igDock:XamDockManager.Panes>
                <igDock:DocumentContentHost>
                    <igDock:SplitPane>
                        <igDock:TabGroupPane>
                            <igDock:ContentPane>
                                <igDP:XamDataGrid>
                                </igDP:XamDataGrid>
                            </igDock:ContentPane>
                        </igDock:TabGroupPane>
                    </igDock:SplitPane>
                </igDock:DocumentContentHost>
            </igDock:XamDockManager>

 I add the document panes programatically via DockManager.AddDocument() method.

Question is that I want to know how to close all these document panes programatically. I try using DockManager.GetPanes() and it returns all the panes, in which I would to execute ContentPaneCommands.Close only for the document content pane which I created programatically via AddDocument API.

One option would be that I maintain a reference to all the doc.pane I created and perform close on it. Is there any other better way to do it? Anyway to perform action only on the panes that are inside TabGroupPane (in above xaml)?

Thanks in advance.