Skip to main content

Saving and Restoring the Layout of Bars

 

The layout of bars can be saved to a data store (for instance, a stream), and then restored from this data store, overriding the changes made since the layout was saved. This document provides more information on this topic.

#Saving and Restoring the Layout of Bars

The layout of bars can be saved to a data store manually, using the BarManager.SaveLayoutToStream method. To restore the layout, use the BarManager.RestoreLayoutFromStream method.

NOTE

For the layout of bars to be saved, set the DevExpress.Xpf.Core.Serialization.DXSerializer.DXSerializer.SerializationID attached property for a BarManager to any object (for example, a string).


xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
<!--...-->
<dxb:BarManager x:Name="barManager1" dx:DXSerializer.SerializationID="barManager">
<!--...-->