windowsforms-devexpress-dot-utils-dot-workspacemanager-1528f3c6.md
Occurs whenever a property is about to be restored from a workspace.
Namespace : DevExpress.Utils
Assembly : DevExpress.Utils.v25.2.dll
NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core
[DXCategory("Behavior")]
public event PropertyCancelEventHandler PropertyDeserializing
<DXCategory("Behavior")>
Public Event PropertyDeserializing As PropertyCancelEventHandler
The PropertyDeserializing event's data class is DevExpress.Utils.PropertyCancelEventArgs.
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";
}
}
Sub WorkspaceManager1_PropertyDeserializing(sender As Object, ea As DevExpress.Utils.PropertyCancelEventArgs) Handles WorkspaceManager1.PropertyDeserializing
Dim view As GridView = TryCast(ea.Owner, GridView)
If Not view Is Nothing AndAlso view Is GridView1 Then
ea.Cancel = ea.PropertyName = "MultiSelect"
End If
End Sub
See Also