Back to Devexpress

PropertyAllowEventArgs.PropertyName Property

corelibraries-devexpress-dot-utils-dot-propertyalloweventargs-a9c1d3c8.md

latest1.8 KB
Original Source

PropertyAllowEventArgs.PropertyName Property

Gets the property name currently being processed.

Namespace : DevExpress.Utils

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
public string PropertyName { get; }
vb
Public ReadOnly Property PropertyName As String

Property Value

TypeDescription
String

The property name.

|

Remarks

Use the PropertyName property to identify which property/setting is currently being processed. Use the Allow option to allow or disallow property serialization or deserialization.

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

See Also

PropertyAllowEventArgs Class

PropertyAllowEventArgs Members

DevExpress.Utils Namespace