Serialization refers to converting an object into a stream of bytes. The purpose of serialization is to save the current state of an object so that it can be recreated when required. DashboardLayout supports serialization through SaveLayout and LoadLayout methods of the C1DashboardLayout class. The SaveLayout method saves the DashboardLayout layout properties, i.e., order and bounds of child containers, to an XML stream or file. The LoadLayout method loads the DashboardLayout layout properties from an XML stream or file.
The following code shows the example of saving and loading the DashboardLayout to and from an XML file:
The following code shows example of saving and loading the DashboardLayout to and from an XML stream: