Skip to main content
A newer version of this page is available. .

DockLayoutManager.MDIMergeStyle Property

Gets or sets if and when the merge mechanism is invoked by the DockLayoutManager.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Docking, DevExpress.Wpf.Navigation

Declaration

public MDIMergeStyle MDIMergeStyle { get; set; }

Property Value

Type Description
MDIMergeStyle

An MDIMergeStyle enumerator value that specifies if and when the merge mechanism is invoked.

Available values:

Name Description
Default

Identical to the MDIMergeStyle.Always value.

WhenChildActivated

The merging mechanism is invoked when a maximized MDI child panel is activated. In the case of a tabbed UI, the merging mechanism is invoked when a selected tab is activated.

The unmerge mechanism is invoked when a maximized MDI child panel is restored from the maximized state to the normal state, or when it is deactivated. In the case of a tabbed UI, the unmerge mechanism is invoked when a selected tab is deselected or deactivated.

Always

The merging mechanism is invoked when an MDI child panel is maximized in a DocumentGroup. In the case of a tabbed UI, it is invoked when a tab is selected in a DocumentGroup. If there are multiple DocumentGroups, the merging mechanism is invoked for all DocumentGroups simultaneously, thus all of them are merged to the parent at the same time.

The unmerge mechanism is invoked when an MDI child panel is restored from the maximized state to the normal state, or in case of the Tabbed UI, when another tab is selected.

Never

Prevents all child tabbed and MDI panels from being merged.

WhenLoadedOrChildActivated

Similar to the WhenChildActivated mode. Additionally, merges those MDI panels and tabs that are initially maximized (docked), but not yet selected (e.g., on application start).

Remarks

A DockLayoutManager supports merging Bars, RibbonControls and RibbonStatusBarControls of child panels with the main panel’s Bars, RibbonControls and RibbonStatusBarControls. In regular MDI mode, by default, these controls are merged when a child MDI panel is maximized. In tabbed MDI mode, (when the host group’s DocumentGroup.MDIStyle property is set to Tabbed), the merging is performed when a tab is activated. Selecting another tab unmerges the previous tab and merges the newly selected one.

The MDIMergeStyle property allows you to specify when the merging/unmerging mechanism is invoked. This property is applied to all child panels within the current DockLayoutManager. Use the DocumentPanel.MDIMergeStyle property to override this setting for individual panels.

It is also possible to prevent Bars, RibbonControls or RibbonStatusBars from being merged by setting the BarManager.MDIMergeStyle, RibbonControl.MDIMergeStyle or RibbonStatusBarControl.MDIMergeStyle property to MDIMergeStyle.Never.

The following code shows how to restrict merging for one specified panel and allow it for all the others:

xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"

<dxdo:DockLayoutManager x:Name="dockManager" MDIMergeStyle="Always">
    <dxdo:LayoutGroup>
        <dxdo:DocumentGroup Name="mdiContainer" MDIStyle="MDI">
            <dxdo:DocumentPanel Name="unmergedPanel"
                                Caption="This Panel Never Invokes The Merging Mechanism"
                                Content="..."
                                MDILocation="250,100"
                                MDIMergeStyle="Never"
                                MDISize="500,300" />
            <dxdo:DocumentPanel Name="mergedPanel"
                                Caption="This Panel Is Merged When Maximized"
                                Content="..."
                                MDILocation="150,150"
                                MDISize="500,300" />
        </dxdo:DocumentGroup>
    </dxdo:LayoutGroup>
</dxdo:DockLayoutManager>
See Also