InputPanel for WinForms | ComponentOne
Layout / Export and Import Layout
In This Topic
    Export and Import Layout
    In This Topic

    The InputPanel control supports export and import of its layout making it easy to replicate the same layout in multiple applications.

    To save the InputPanel layout as XML at design time, you can use the Save as XML File option provided by C1InputPanel Tasks menu or context menu of the control. To export the layout using code, you can use Save() method of the C1InputPanel class.

       // Save the InputPanel definition as an XML file
       c1InputPanel1.Save("C:\\Users\\Documents\\Sample1.xml");    
    
       ' Save the InputPanel definition as an XML file
       c1InputPanel1.Save("C:\\Users\\Documents\\Sample1.xml")        
    

    Similarly, to load layout from an XML at design time, the InputPanel control provides Load From XML File option through its tasks menu as well as through context menu. At runtime, you can use the Load() method to fetch InputPanel definition from an XML and draw the InputPanel layout.

       // Load the InputPanel definition from an XML file
       c1InputPanel1.Load("C:\\Users\\Documents\\Sample2.xml");            
    
    ' Load the InputPanel definition from an XML file
      c1InputPanel1.Load("C:\Users\Documents\Sample2.xml")                        
    
    See Also