Back to Devexpress

PropertyAllowEventArgs Class

corelibraries-devexpress-dot-utils-5294a86f.md

latest3.1 KB
Original Source

PropertyAllowEventArgs Class

Contains data for PropertySerializing and PropertyDeserializing events.

Namespace : DevExpress.Utils

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
public class PropertyAllowEventArgs :
    EventArgs
vb
Public Class PropertyAllowEventArgs
    Inherits EventArgs

PropertyAllowEventArgs is the data class for the following events:

Remarks

Handle the PropertySerializing and PropertyDeserializing events to include certain settings in the control’s layout when it is saved or restored. The e.PropertyName parameter specifies which property/setting is currently being processed. Use the e.Allow property to allow or disallow property serialization/deresialization.

Read the following topic for information and examples: Save and Restore Layouts of DevExpress Controls.

Example

The following example demonstrates how to avoid serializing certain settings:

csharp
treeList.PropertySerializing += (s, e) => {
    if(e.Owner is TreeListColumn && e.PropertyName == "Caption")
        e.Allow = DefaultBoolean.False;
};
vb
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

Inheritance

Object EventArgs PropertyAllowEventArgs

See Also

PropertyAllowEventArgs Members

DevExpress.Utils Namespace