Back to Devexpress

AllowPropertyEventArgs.Allow Property

wpf-devexpress-dot-xpf-dot-core-dot-serialization-dot-allowpropertyeventargs.md

latest2.5 KB
Original Source

AllowPropertyEventArgs.Allow Property

Gets or sets whether the property can be deserialized.

Namespace : DevExpress.Xpf.Core.Serialization

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public bool Allow { get; set; }
vb
Public Property Allow As Boolean

Property Value

Type
Boolean

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Allow property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

how-to-prevent-certain-gridcontrols-properties-from-being-serialized-t158989/CS/WpfApplication58/MainWindow.xaml.cs#L20

csharp
if (e.DependencyProperty == GridColumn.WidthProperty)
        e.Allow = false;
}

how-to-prevent-certain-gridcontrols-properties-from-being-serialized-t158989/VB/WpfApplication58/MainWindow.xaml.vb#L23

vb
Private Sub OnAllowProperty(ByVal sender As Object, ByVal e As AllowPropertyEventArgs)
    If e.DependencyProperty Is BaseColumn.WidthProperty Then e.Allow = False
End Sub

See Also

AllowPropertyEventArgs Class

AllowPropertyEventArgs Members

DevExpress.Xpf.Core.Serialization Namespace