DocumentGroup Class
Represents child panels (DocumentPanel objects) using either a tabbed or MDI UI.
Namespace: DevExpress.Xpf.Docking
Assembly: DevExpress.Xpf.Docking.v19.1.dll
Declaration
Related API Members
The following members accept/return DocumentGroup objects:
Remarks
DocumentGroup objects are used within the DockLayoutManager to create a tabbed or MDI interface for your documents. Individual pages in a DocumentGroup are represented by DocumentPanel objects.
To switch between the tabbed and MDI styles, use the DocumentGroup.MDIStyle property.
In MDI mode, it's possible to:
- set the location and size of child panels via the DocumentPanel.MDILocation and DocumentPanel.MDISize properties.
- maximize, minimize or restore a specific child panel via a corresponding method provided by the DockLayoutManager.MDIController object.
- tile child panels vertically or horizontally via the methods provided by the DockLayoutManager.MDIController object.
NOTE
DocumentGroups cannot be used outside the DockLayoutManager component.
See Document Groups and Panels to learn more.
Example 1
This example shows how to create a DocumentGroup with two tabs, represented by DocumentPanel objects.
NOTE
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-create-a-documentgroup-with-two-tabs-e1670.
<dxdo:DocumentGroup x:Name="documentGroup1" ItemHeight="2*" SelectedTabIndex="1">
<dxdo:DocumentPanel x:Name="document1" Caption="Document 1">
<RichTextBox />
</dxdo:DocumentPanel>
<dxdo:DocumentPanel x:Name="document2" Caption="Document 2">
<RichTextBox />
</dxdo:DocumentPanel>
</dxdo:DocumentGroup>
Example 2
In this example, MDI mode is enabled for a DocumentGroup via the MDIStyle property. In this mode, the DocumentGroup's panels are represented as floating windows.
The following image shows the result:
NOTE
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-enable-mdi-mode-for-a-documentgroup-e2190.
<dxdo:DocumentGroup x:Name="documentGroup1" ItemWidth="2*" MDIStyle="MDI">
<dxdo:DocumentPanel x:Name="document1" Caption="Document 1" MDISize="200,100" >
<RichTextBox/>
</dxdo:DocumentPanel>
<dxdo:DocumentPanel x:Name="document2" Caption="Document 2" MDISize="200,100" MDILocation="50,120" >
<RichTextBox/>
</dxdo:DocumentPanel>
</dxdo:DocumentGroup>