Skip to main content

DockManager.LayoutUpgrade Event

Occurs after a layout whose version doesn’t match the current layout’s version has been loaded from storage (a stream, xml file or system registry).

Namespace: DevExpress.XtraBars.Docking

Assembly: DevExpress.XtraBars.v23.1.dll

NuGet Package: DevExpress.Win.Navigation


public event LayoutUpgradeEventHandler LayoutUpgrade

Event Data

The LayoutUpgrade event's data class is LayoutUpgradeEventArgs. The following properties provide information specific to this event:

Property Description
NewHiddenItems Returns an array of items that exist in the current control but do not exist in the layout being loaded. These items are hidden. This property is in effect for the LayoutControl.
PreviousVersion Returns the textual representation of the previous layout version.


The LayoutUpgrade event allows you to customize the current layout of dock windows after an earlier version of the layout has been loaded and applied to the dock manager. See the DockManager.LayoutVersion topic for more information.


Suppose an earlier version of an application contained one dock panel (dockPanel1). When running the application, an end-user saved the layout of the dock windows to an XML file. Then, a new version of the application was designed. For example, it added another panel (dockPanel2). By default, when the previously saved layout is loaded within the new application, the current layout of the dock windows will be overridden. Only dockPanel1 will be visible. dockPanel2 will be hidden.

To enable end-users to work with previously saved layouts, and ensure that new features and dock panels will still be visible after old layouts have been loaded, you should specify the layout versions via the DockManager.LayoutVersion property, and handle the DockManager.LayoutUpgrade event:

In this example, the new dockPanel2 panel is registered within the dock manager and then docked to the bottom of the window.

private void dockManager1_LayoutUpgrade(object sender, 
DevExpress.Utils.LayoutUpgradeEventArgs e) {
See Also