Tab close from code

2 posts, 0 answers
  1. maydaytx
    maydaytx avatar
    9 posts
    Member since:
    Jan 2007

    Posted 12 Sep 2007 Link to this post

    I am using the document manager in TDI mode.  I can't figure out how to close a tab from code. This is kind of what I'm looking for:

    foreach (DocumentPane pane in MainDockingManager.PrimarySite.ManagedDockables)
    {
        pane.Close();
    }

    Love,

    ~DuckLeg
     |
     |
    /|\
  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 13 Sep 2007 Link to this post

    Hi Brandon,

    The right way to close documents is to use the DockingManager functions:

    1) Solution 1:

    foreach(DocumentPane pane in dockingManager1.Documents) 
        dockingManager1.CloseDocument(pane); 

    2) Solution 2:
     
    dockingManager1.CloseAllDocuments(); 

    I hope this helps.
     

    Sincerely yours,
    Julian Benkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top