Nevron .NET Vision
User Interface for .NET / User's Guide / Docking Panels / Layout Persistency

In This Topic
    Layout Persistency
    In This Topic
     Overview
    Since 2006 Q1 release Nevron Docking Panels provide complete layout persistency in five different formats among which are two entirely custom formats, completely version tolerant. The persistency includes also all the appearance styles as well as all the documents.
     Persisting The Layout

    Following is a list of steps you should complete in order to serialize the current layout of your panels:

     

    1. Give each panel a unique string representation - for example "PropWindow". Note that Key and Text are different. If you create custom containers you should give them a key also. Give each NControlHost instance a unique key also.
    2. Create a NDockingFrameworkState object and assign its Manager value.
    3. Select the preferred persistency format, set by default to CustomXML. For more information about available formats see the PersistencyFormat enumeration.
    4. Choose one of the three overloads of the Save method and call it. Note that the parameterless one will create an OpenFileDialog and prompt the user to select a file.

     

    In order to reload previously saved state you should again create a NDockingFrameworkState object and call one of its Load methods.

     DockingFrameworkState Events

    Following are the events fired by a NDockingFrameworkState object:

     

    Method Description

     ResolveDocumentClient

    As the Windows Forms Control may not be persisted a NUIDocument may not serialize its client. Instead each time a document is deserialized this event is fired allowing you to dynamically add the core client of the associated document.

     StateRestored

    Fired when a state is successfully restored.

     StateSaved

    Fired when a state is successfully saved.

     Remarks
    A state is valid per manager only. You may not load states among different docking managers. The NDockingFrameworkState class is completely customizable allowing you to perform your own custom persistency logic. In case you provide custom serialization data you should specify the type of that data. For more information see the ManagerDataType property.
    See Also