Docking Tab for WinForms | ComponentOne
Docking Operations / Load and Save Docking Tab Layout
In This Topic
    Load and Save Docking Tab Layout
    In This Topic

    You can save and load the layout of the DockingTab by using the SaveLayout and RestoreLayout methods. The syntax for the methods is as follows:

    C#
    Copy Code
    //Saves the current layout of the tabs on the form to the specified file.
    static void SaveLayout(Form form, string filename);
     
    //Restores the previously saved layout of the tabs on the form from the specified file
    Static void RestoreLayout(Form form, string filename);                   
    

    The following code is an example of how these methods can be applied:

    C#
    Copy Code
    //Saves the current layout of the tabs on the form to the specified file.
    C1DockingTab.SaveLayout (myForm, "myLayoutFile.xml");
    //Restores the previously saved layout of the tabs on the form from the specified file
    C1DockingTab.RestoreLayout(myForm, "myLayoutFile.xml");