Back to Devexpress

PropertyAllowEventArgs.Owner Property

corelibraries-devexpress-dot-utils-dot-propertyalloweventargs-87d87862.md

latest1.7 KB
Original Source

PropertyAllowEventArgs.Owner Property

Gets the control or UI element whose layout settings are being serialized or deserialized.

Namespace : DevExpress.Utils

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
public object Owner { get; }
vb
Public ReadOnly Property Owner As Object

Property Value

TypeDescription
Object

The control or UI element whose layout settings are being serialized or deserialized (for example GridControl, TreeList).

|

Remarks

The following example demonstrates how to avoid serializing certain settings of TreeList columns:

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