Version

About Infragistics Control Persistence Framework

The Infragistics Persistence Framework™ library provides an unified API that can be used to save and load the current state of controls.

The Persistence Framework does not provide full support for the controls that are specific to the Ultimate UI for WPF and are not cross-platforms controls.

You can manage every phase of the persistence process. You can define which DependencyObjects get persisted and which DependencyObjects properties can be saved and loaded. The save and load process can be easily customized.

The static Save method returns a MemoryStream which can be further processed. It is up to you where it will be stored – e.g. Isolated Storage.

  • Single control settings can be stored and loaded via the PersistenceManager object’s Save and Load methods.

  • Multiple controls properties can be saved to a single data store via the PersistenceGroup property.

  • In order to customize which properties are saved, you need to use the PersistenceSettings object and its two collection properties: PropertySettings and IgnorePropertySettings.

  • Control properties can be identified by a name or a type – you can use PropertyNamePersistenceInfo or PropertyTypePersistenceInfo properties respectively. You can implement your own business logic how the information gets saved and loaded by creating a new class which extends the PropertyPersistenceInfoBase class.

  • Events are raised for saving and loading of each property. You can change how the property is saved or loaded. Events can be attached to each DependencyObject being saved, via the PersistenceSettings object, or to an entire controls group via the PersistenceGroup object. For the PersistenceGroup, the PersistenceSaved and PersistenceLoaded events are fired only after all group objects are saved and loaded. For the PersistenceSettings, the event is raised after all properties have been saved and loaded.

  • All exceptions that are thrown while loading are caught and presented to you in the PersistenceLoaded event which is raised after an object is loaded.

Note
Note

In order to persist and restore the SelectedItems collection in the xamComboEditor control, the data model class must have an empty constructor, implement the IEquitable interface and override the Equals and GetHashCode methods.

Related Topics