This example demonstrates how to exclude properties from serialization. To do this, handle the DXSerializer.AllowProperty event for an object whose property should not be serialized. In the event handler, set the AllowPropertyEventArgs.Allow property to False
to prohibit property serialization.
In this example, the ID column's Width property is excluded. Note that since GridColumn is not a UIElement descendant, it is necessary to use the GridColumn.AddHandler method instead of DXSerializer.AddAllowPropertyHandler to subscribe to the event.
- WPF Data Grid - Save Layout and Restore It from a Memory Stream
- WPF MVVM Framework - Serialize/Deserialize a View's Size and State with LayoutSerializationService and CurrentWindowSerializationBehavior
(you will be redirected to DevExpress.com to submit your response)