DockPanel.Register(DockManager) Method
Registers the dock panel.
Namespace: DevExpress.XtraBars.Docking
Assembly: DevExpress.XtraBars.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Parameters
Name | Type | Description |
---|---|---|
value | DockManager | A DockManager object that owns the dock panel. |
Remarks
Use the Register method to register new dock panels within the dock manager when an earlier version of the layout is loaded from a data store. For more information, see Saving and Restoring Layouts to a File, Stream and System Registry.
Example
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) {
dockPanel2.Register(dockManager1);
dockPanel2.DockTo(DevExpress.XtraBars.Docking.DockingStyle.Bottom);
}