Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

WorkspaceManager.PropertyDeserializing Event

Occurs whenever a property is about to be restored from a workspace.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v24.2.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

#Declaration

[DXCategory("Behavior")]
public event PropertyCancelEventHandler PropertyDeserializing

#Event Data

The PropertyDeserializing event's data class is DevExpress.Utils.PropertyCancelEventArgs.

#Remarks

Arguments for the PropertyDeserializing event provide the Owner and PropertyName properties to identify what settings are being restored and what controls they belong to. The Cancel property allows you to skip restoring the desired property. By doing so, you can selectively deserialize properties, applying only those that are needed.

void workspaceManager1_PropertyDeserializing(object sender, DevExpress.Utils.PropertyCancelEventArgs ea) {
    GridView view = ea.Owner as GridView;
    if (view != null && view == gridView1) {
        ea.Cancel = ea.PropertyName == "MultiSelect";
    }
}
See Also