Well since you're using PRISM you need to make sure that all modules have loaded in the RadDocking
before saving or loading their properties. For example you can get a reference of the IModuleManager
in your Shell main view. Then you will be able to attach a handler to the IModuleManager.LoadModuleCompleted
event and load the persisted settings after all modules have successfully loaded.
When you're uring the PersistenceFramework to persist the UI of your application, you basically get two options:
- save the settings in a stream object - in this case, you'll need to save the stream object so that it can be used at any time to load the persisted settings. This approach is usually used when you'd like to keep the persisted settings in a stream in a database.
- save the settings in a file in the isolated storage - the isolated storage is a data storage mechanism that provides isolation and safety by defining standardized ways of associating code with saved data. And the PersistenceFramework allows you to apply a StorageId on the UIElements that have to be persisted and automatically creates a file in the isolated storage to save the settings of these UIElements. When you call the SaveToStorage() method, the properties of all objects marked with a StorageId will be persisted in different files in the isolated storage and when you call LoadFromStorage() the framework will find the appropriate files for the objects and load the saved settings accordingly.
I hope this information will help, still let us know if we can further assist you.
the Telerik team