corelibraries-devexpress-dot-utils-dot-propertyalloweventargs.md
Gets or sets whether to allow property serialization or deserialization.
Namespace : DevExpress.Utils
Assembly : DevExpress.Data.v25.2.dll
NuGet Package : DevExpress.Data
public DefaultBoolean Allow { get; set; }
Public Property Allow As DefaultBoolean
| Type | Description |
|---|---|
| DefaultBoolean |
True, Default to allow property serialization or deserialization; otherwise, False.
|
Available values:
| Name | Description | Return Value |
|---|---|---|
| True |
The value is true.
|
0
| | False |
The value is false.
|
1
| | Default |
The value is specified by a global option or a higher-level object.
|
2
|
Use the Allow option to allow or disallow property serialization or deserialization. The PropertyName property identify which property/setting is currently being processed.
The following example demonstrates how to avoid serializing certain settings:
treeList.PropertySerializing += (s, e) => {
if(e.Owner is TreeListColumn && e.PropertyName == "Caption")
e.Allow = DefaultBoolean.False;
};
AddHandler treeList.PropertySerializing, Sub(s, e)
If TypeOf e.Owner Is TreeListColumn AndAlso e.PropertyName = "Caption" Then
e.Allow = DefaultBoolean.False
End If
End Sub
See Also