Back to Devexpress

DocumentGroup.MDIStyle Property

wpf-devexpress-dot-xpf-dot-docking-dot-documentgroup-b1a8b2fb.md

latest7.9 KB
Original Source

DocumentGroup.MDIStyle Property

Gets or sets how the DocumentGroup displays its child panels, as floating windows or as tabs. This is a dependency property.

Namespace : DevExpress.Xpf.Docking

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

NuGet Package : DevExpress.Wpf.Docking

Declaration

csharp
public MDIStyle MDIStyle { get; set; }
vb
Public Property MDIStyle As MDIStyle

Property Value

TypeDescription
MDIStyle

An MDIStyle value that specifies how the DocumentGroup presents its child panels, as floating windows or as tabs.

|

Available values:

NameDescription
Default

The same option as MDIStyle.Tabbed.

| | Tabbed |

A DocumentGroup is rendered as a tab container, where children are displayed as tabs.

| | MDI |

A DocumentGroup’s children are displayed as floating windows that can float within the DocumentGroup’s boundaries.

|

Remarks

When the MDIStyle property is set to MDIStyle.MDI, the DocumentGroup displays its child DocumentPanel objects as floating windows. You can use the DockLayoutManager.MDIController object’s methods to control child panels in this mode.

Use the DocumentPanel.MDIState property to specify the state of each DocumentPanel.

Tip

In MDI Mode, you can move DocumentPanels within the boundaries of a parent group only. Use Float Groups to move panels within the boundaries of a window or a desktop.

Example

The following code sample displays the documentGroup1 DocumentGroup in MDI mode ( MDIStyle is MDIStyle.MDI):

xaml
<dxdo:DocumentGroup x:Name="documentGroup1" MDIStyle="MDI">
  <dxdo:DocumentPanel x:Name="document1" Caption="Document 1" MDISize="300,100">
    <RichTextBox/>
  </dxdo:DocumentPanel>
  <dxdo:DocumentPanel x:Name="document2" Caption="Document 2" MDISize="250,100" MDILocation="50,120" >
    <RichTextBox/>
  </dxdo:DocumentPanel>
</dxdo:DocumentGroup>

View Example: How To Enable MDI Mode for a DocumentGroup

The following code snippets (auto-collected from DevExpress Examples) contain references to the MDIStyle property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-dock-layout-manager-define-prism-regions-for-dock-layout-manager-elements/CS/PrismOnDXDocking/Shell.xaml#L79

xml
<dxdo:LayoutGroup Name="leftGroup" prism:RegionManager.RegionName="{x:Static Infrastructure:RegionNames.LeftRegion}" ItemWidth="0.2*" />
<dxdo:DocumentGroup Name="documentContainer" ItemWidth="0.6*" MDIStyle="MDI" prism:RegionManager.RegionName="{x:Static Infrastructure:RegionNames.MainRegion}" DestroyOnClosingChildren="False"/>
<dxdo:LayoutGroup Name="rightGroup" prism:RegionManager.RegionName="{x:Static Infrastructure:RegionNames.RightRegion}" ItemWidth="0.2*" />

wpf-docklayoutmanager-merge-bars-in-controls-that-support-automatic-merging/CS/WpfApplication1/MainWindow.xaml#L21

xml
<dxdo:LayoutGroup>
    <dxdo:DocumentGroup x:Name="ChildDocumentGroup" MDIStyle="Tabbed" DestroyOnClosingChildren="False">
        <dxdo:DocumentPanel x:Name="Document1" Caption="DocumentPanel1" MDISize="800,600">

wpf-docklayoutmanager-load-an-external-window-or-usercontrol-into-a-documentpanel/CS/DocumentPanel_Content/MainWindow.xaml#L34

xml
<dxdo:LayoutGroup>
    <dxdo:DocumentGroup x:Name="documentGroup1" SelectedTabIndex="1" DestroyOnClosingChildren="False" MDIStyle="MDI">
        <dxdo:DocumentPanel x:Name="docPanel1" Caption="Panel 1" MDISize="300,250"/>

wpf-docklayoutmanager-merge-ribbon-controls/CS/WpfApplication1/MainWindow.xaml#L40

xml
<dxdo:LayoutGroup>
    <dxdo:DocumentGroup x:Name="ChildDocumentGroup" MDIStyle="Tabbed" DestroyOnClosingChildren="False">
        <dxdo:DocumentPanel x:Name="Document1" Caption="Document1" MDISize="800,600">

wpf-docklayoutmanager-merge-ribbon-controls/CS/WpfApplication1/MainWindow.xaml.cs#L33

csharp
{
    ChildDocumentGroup.MDIStyle = MDIStyle.MDI;
}

wpf-dock-layout-manager-upgrade-layouts-between-versions/CS/MainWindow.xaml.cs#L38

csharp
if (e.RestoredVersion == "1.0") {
    documentGroup1.MDIStyle = MDIStyle.MDI;
}

wpf-docklayoutmanager-merge-ribbon-controls/VB/WpfApplication1/MainWindow.xaml.vb#L31

vb
Private Sub biMDI_ItemClick(ByVal sender As Object, ByVal e As DevExpress.Xpf.Bars.ItemClickEventArgs)
    ChildDocumentGroup.MDIStyle = MDIStyle.MDI
End Sub

See Also

MDIController

MDILocation

MDISize

MDIState

DocumentGroup Class

DocumentGroup Members

DevExpress.Xpf.Docking Namespace