Skip to main content

DockLayoutManager.LayoutRoot Property

Gets or sets a root group for items (panels and other groups). This is a dependency property.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v24.1.dll

NuGet Package: DevExpress.Wpf.Docking

Declaration

public LayoutGroup LayoutRoot { get; set; }

Property Value

Type Description
LayoutGroup

A LayoutGroup object that represents the root group.

Remarks

The root group is the bottommost area to which items (panels and regular, tabbed and document groups) can be docked. You need to create a root group manually, assigning a LayoutGroup object to the LayoutRoot property.

The LayoutRoot property is marked with the ContentPropertyAttribute attribute. So, in XAML, the LayoutRoot property is initialized with the element declared between the start and end DockLayoutManager tags. Since a root group must be represented by a LayoutGroup object, the element declared between the start and end DockLayoutManager tags must be a LayoutGroup object.

A root group can contain LayoutPanel, LayoutGroup, TabbedGroup and DocumentGroup objects as children. The group’s children are arranged either horizontally or vertically, according to the LayoutGroup.Orientation property. They can be accessed via the LayoutGroup.Items property. This property is marked with the ContentPropertyAttribute attribute, so in XAML you can add elements to the group between the start and end LayoutGroup tags. To dock an item at a specific position in code, use the methods provided by the DockLayoutManager.DockController object.

Closed (hidden), auto-hidden and floating panels can never be children of the root group. To create these kinds of panels in XAML, use the DockLayoutManager.ClosedPanels, DockLayoutManager.AutoHideGroups and DockLayoutManager.FloatGroups collections. To create these panels in code, use the methods provided by the DockLayoutManager.DockController object.

For an example, see How to create a simple layout of dock panes.

The following code snippets (auto-collected from DevExpress Examples) contain references to the LayoutRoot 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.

See Also