Skip to main content
All docs
V23.2

DXSerializer.Enabled Attached Property

Gets or sets whether the DXSerializer should serialize/deserialize properties of the control to which this property is specified. This is an attached property.

Namespace: DevExpress.Xpf.Core.Serialization

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

NuGet Package: DevExpress.Wpf.Core

Declaration

Returns

Type Description
Boolean

true, to enable serialization/deserialization of the specified control’s properties; otherwise, false.

Remarks

The following code sample enables a ThemedWindow‘s property serialization to an XML file:

<dx:ThemedWindow ...
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    x:Name="mainwindow"
    dx:DXSerializer.Enabled="True">
    <Grid>
        <Button Content="Save Layout" Click="Button_Click"/>
        <!-- ... -->
    </Grid>
    ...
</dx:ThemedWindow>
private void Button_Click(object sender, RoutedEventArgs e) {
    DXSerializer.Serialize(mainwindow, "windowlayout.xml");
}
See Also