By default, the PersistenceFramework uses a serializer that reads and saves the values of the UI-related properties. The ItemsSource property of the ItemsControls, contains business objects and by default they are omitted. However, you can change this by using the full serializer instead. You can do this by subclassing the PersistenceManager
and overriding the GetSerializerOverride
public class MyPersistenceManager : Telerik.Windows.Persistence.PersistenceManager
protected override Telerik.Windows.Persistence.Serialization.ISerializer GetSerializerOverride()
return new Telerik.Windows.Persistence.Serialization.Serializer(this);
Generally, I would not recommend using this approach, unless you really need to save your business objects. What you can do as an alternative, is to register a custom property provider and plug in into the serialization process in this manner.
You can see some sample custom property providers in our online demos for the GridView
controls. Please let me know if you need further assistance in creating a custom provider.
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward!
We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>