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

Document Groups and Panels

  • 3 minutes to read

Overview

Document Groups (DocumentGroup objects) represent child Document Panels (DocumentPanel objects) using either a tabbed or MDI UI.

DocumentGroup

Use the DocumentGroup.MDIStyle property to switch between UIs. To specify a child MDI panel’s size and location within its parent DocumentGroup, use the DocumentPanel.MDISize and DocumentPanel.MDILocation property, respectively.

An end-user can switch between dock panels (including child panels of a DocumentGroup) using the Document Selector. To invoke the Document Selector, press CTRL+TAB.

Child Items

Document Groups accept Document Panel objects and regular layout panels as children (the latter is not typical and can be primarily seen only done by end-users at runtime). In XAML, you can define a group’s child items directly between the start and end DocumentGroup tags. In code, you can add, delete, and modify child items using the group’s Items collection.

Dock Operations

To add Document Panels to a Document Group in code, use methods provided by the DocumentGroup object (for instance, the Add method).

Various operations on panels in MDI mode are supported by the DockLayoutManager.MDIController object.

Docking Modes

DocumentGroups support two docking modes: regular and Visual Studio 2010-inspired. To turn on the desired docking mode, use the DockLayoutManager.DockingStyle property.

  • In the default mode, DocumentPanels can be dragged away from their parent DocumentGroups at runtime. End-users are able to dock these panels as regular layout panels.

    Dock Windows - Default Docking Mode

  • The Visual Studio 2010 mode allows you to dock document panels anywhere except for document groups.

    Dock Windows - VS2010 Docking Mode

    In VS2010 mode, end-users can arrange document groups either vertically or horizontally similar to Visual Studio.

Floating Containers

DocumentPanels, hosted within a DocumentGroup, can be undocked from its parent group. Depending on the DockLayoutManager.FloatingDocumentContainer property value, such panels can either float separately from each other, or dock to a floating container. In the latter case, each DocumentPanel that is made floating is hosted within a float group with the automatically created DocumentGroup inside. Other floating panels can be docked to this container in the same manner as they dock to a DocumentGroup. The figure below illustrates two floating DocumentPanels docked to a floating document container to which another floating container is being docked.

DockLayoutManager - FloatingDocumentContainer

You can dock entire floating containers to DocumentGroups or other floating containers. This will dock all panels contained within this container to the target container or DocumentGroup. To do so, drag the container’s header as shown in the image below.

DockLayoutManager - FloatingDocumentContainer Dragging

If the DockLayoutManager.ShowFloatWindowsInTaskbar property equals true, there are no individual taskbar thumbnails for each DocumentPanel contained within a floating container. Instead, the single thumbnail for the entire container is displayed.

Example

See Also