DocumentGroup Class
A container for DocumentPanel and LayoutPanel objects. The DocumentGroup displays child DocumentPanel‘s in tabbed or MDI UIs.
Namespace: DevExpress.Xpf.Docking
Assembly: DevExpress.Xpf.Docking.v24.2.dll
NuGet Package: DevExpress.Wpf.Docking
#Declaration
public class DocumentGroup :
TabbedGroup
#Related API Members
The following members return DocumentGroup objects:
#Remarks
#Create DocumentGroups
#In XAML
The following code sample creates a DocumentGroup that contains two DocumentPanels:
<Window ...
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
<dxdo:DockLayoutManager>
<dxdo:LayoutGroup>
<dxdo:DocumentGroup>
<dxdo:DocumentPanel Caption="Document1"/>
<dxdo:DocumentPanel Caption="Document2"/>
</dxdo:DocumentGroup>
</dxdo:LayoutGroup>
</dxdo:DockLayoutManager>
</Window>
#In Code
The following code sample creates the DocumentGroup with nested DocumentPanels:
<Window ...
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
<dxdo:DockLayoutManager x:Name="DockLayoutManager1">
<dxdo:LayoutGroup x:Name="rootgroup">
</dxdo:DockLayoutManager>
</Window>
DocumentGroup documentgroup = new DocumentGroup();
DockLayoutManager1.DockController.Dock(documentgroup, rootgroup, DockType.Fill);
DocumentPanel document1 = DockLayoutManager1.DockController.AddDocumentPanel(documentgroup);
document1.Caption = "Document1";
DocumentPanel document2 = DockLayoutManager1.DockController.AddDocumentPanel(documentgroup);
document2.Caption = "Document2";
DockLayoutManager1.DockController.Dock(document2, documentgroup, DockType.Fill);
Note
You can use Document
#Child Items
The DocumentGroup object can contain the following child objects:
#Customize a DocumentGroup and its Children
#Styles
Use the DocumentGroup.MDIStyle property to switch between the Tabbed and MDI styles.
#MDI Style
You can use the following properties to customize a DocumentGroup and its child elements when the MDI style is active (DocumentGroup.MDIStyle is MDIStyle.MDI).
Tip
In MDI Mode, you can move Document
Property | Description |
---|---|
Document |
Specify a child panel’s location and size. |
Dock |
Align child panels horizontally or vertically. |
Dock |
Control a child panel’s state. |
#Tabbed Style
You can use the following properties to customize a DocumentGroup and its child elements when the Tabbed style is active (DocumentGroup.MDIStyle is MDIStyle.Tabbed).
Property | Description |
---|---|
Document |
Specifies the Document |
Caption |
Specifies the Document |
Document |
Specifies the Close button location. |
Document |
Specifies whether the drop-down button is displayed. |
#Pinned Panels
Property | Description |
---|---|
Document |
Specifies whether the Document |
Document |
Specifies the pinned tab’s location. |
Document |
Specifies whether the pin button is displayed. |
#Dock Modes
Use the DockLayoutManager.DockingStyle property to switch between dock modes.
#Default Mode
Default mode allows you to drag DocumentPanels from their parent DocumentGroups at runtime. End users can dock these panels as regular layout panels
#Visual Studio 2010 Mode
VS2010 mode allows you to dock DocumentPanels only to DocumentGroups. End users can arrange DocumentGroups either vertically or horizontally.
#Floating Containers
You can undock a DocumentGroup‘s child DocumentPanels from the parent group. The DockLayoutManager.FloatingDocumentContainer property specifies the undocked panel’s behavior.
#Taskbar Thumbnails
If the DockLayoutManager.ShowFloatWindowsInTaskbar property is true
, the floating DocumentPanel‘s individual taskbar thumbnails are not displayed. Instead, a single thumbnail for the entire container is displayed.
#Operations with DocumentGroups
#Methods
Use the DockLayoutManager.MDIController object’s methods to control a DocumentGroup and its DocumentPanels when the MDI style is active (DocumentGroup.MDIStyle is MDIStyle.MDI).
#Events
You can use the following DockLayoutManager events to control a DocumentGroup and its DocumentPanels at runtime:
Event | Description |
---|---|
Dock |
Fires when an MDI child document has been activated. |
Dock |
Fires before an MDI child panel is activated. |
Dock |
Fires after a dock item has been activated. |
Dock |
Fires before a dock item is activated, and allows you to prevent this action. |
Dock |
Fires after a dock item has been closed (hidden). |
Dock |
Fires before a dock item is closed (hidden), and allows you to prevent this action. |
Dock |
Fires after a visible auto-hidden dock panel has slid away. |
Dock |
Fires before a dock item is dragged over dock hints, and allows you to prevent dock zones from being displayed. |
Dock |
Fires after a dock item has been restored from the closed (hidden) state. |
Dock |
Fires before a dock item is restored from the closed (hidden) state, and allows you to prevent this action. |
Dock |
Fires when a docking operation starts, and allows you to prevent this operation. |
The DockLayoutManager deletes the DocumentGroup
if you remove all items from this group. To prevent this behavior, set the DocumentGroup
‘s DestroyOnClosingChildren property to false
.
#End-User Interactions
An end user can switch between dock panels (including a DocumentGroup‘s child panels) with the Document Selector.
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the DocumentGroup class.
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.