wpf-6827-controls-and-libraries-layout-management-dock-windows-visual-elements.md
This topic describes visual element types that are included in the DockLayoutManager control.
| Element | Description |
|---|---|
| LayoutPanel | A dock panel. You can use a LayoutPanel in dock and layout UIs. |
| AutoHideGroup | A container for auto-hidden dock panels. |
| LayoutGroup | A container for items and groups. |
| FloatGroup | A container for floating panels. |
| TabbedGroup | A tabbed group of dock panels (LayoutPanel objects). |
| DocumentGroup | A container for DocumentPanel and LayoutPanel objects. The DocumentGroup displays child DocumentPanel‘s in tabbed or MDI UIs. |
| DocumentPanel | A child panel in a DocumentGroup. The DocumentPanel supports the MDI and Tabbed UIs. |
Refer to the following topic for more information on how to customize the DockLayoutManager‘s visual elements: Customize Appearance.
This section lists LayoutPanel‘s elements.
Refer to the following topic for more information on how to customize the LayoutPanel‘s caption: Customize Appearance - LayoutPanel’s Caption.
Refer to the following topic for more information on how to customize the LayoutPanel‘s tab caption: Customize Appearance - LayoutPanel’s Tab Caption.
| Element | Description |
|---|---|
| DockGuide | Contains values that specify dock hint sections. Each DockGuide consists of multiple DockHints. |
| DockHint | Contains values that specify the dock hint. |
Run Demo: Dock Layout Manager - Dock Hints
The Closed Panel Bar allows you to access closed panels that are stored in the DockLayoutManager.ClosedPanels collection.
Use the DockLayoutManager.ClosedPanelsBarPosition and DockLayoutManager.ClosedPanelsBarVisibility properties to specify the position and visibility of the Closed Panel Bar :
dockLayoutManager.ClosedPanelsBarVisibility = ClosedPanelsBarVisibility.Auto;
dockLayoutManager.ClosedPanelsBarPosition = Dock.Left;
dockLayoutManager.ClosedPanelsBarVisibility = ClosedPanelsBarVisibility.Auto
dockLayoutManager.ClosedPanelsBarPosition = Dock.Left
Run Demo: Dock Layout Manager - Closed Panel Bar
At runtime, users can press Ctrl+Tab to display the Document Selector. It allows them to switch between panels and documents in your application’s layout.
Refer to the following topic for more information: Document Selector.
| Element | Description |
|---|---|
| SeparatorItem | A line that you can place between neighboring UI elements to improve the display of your application’s layout. |
| LabelItem | A label that displays custom text. |
| LayoutControlItem | A Layout Group‘s child element that can display a control with a label. |
| LayoutGroup | A container for items and groups. |
| LayoutSplitter | Allows you to resize a layout item at runtime. |
| EmptySpaceItem | Adds whitespace to a UI. The whitespace is a rectangle object with invisible bounds that has its own height and width. |
Read Tutorial: Layout UI Items
Refer to the following topic for more information on the Customization Window and Customization Mode : Layout UI Items.
| Member | Description |
|---|---|
| ContextMenuCustomizations | Allows you to add new menu items or remove existing items from the layout item’s context menu. |
| ContextMenuCustomizationsTemplate | Gets or sets a template used to customize menu items in all affected dock layout items. This is a dependency property. |
| DefaultMenuItemNames | Contains names of the context menu items. |
| ShowingMenu | Fires before showing a context menu, and allows it to be customized. |
Use the RemoveAction / InsertAction bar items to remove/add menu items from the context menu.
The following code sample removes the Closed Panels bar item and adds the About menu item:
<Window ...
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars">
<Grid>
<dxdo:DockLayoutManager>
<dxdo:LayoutGroup>
<dxdo:LayoutPanel Caption="Panel1" >
<dxdo:LayoutPanel.ContextMenuCustomizations>
<dxb:InsertAction Index="0">
<dxb:BarButtonItem Content="About" ItemClick="BarButtonItem_ItemClick" />
</dxb:InsertAction>
<dxb:RemoveAction ElementName="{x:Static dxdo:DefaultMenuItemNames.ClosedPanels}"/>
</dxdo:LayoutPanel.ContextMenuCustomizations>
</dxdo:LayoutPanel>
<!-- ... -->
</dxdo:LayoutGroup>
</dxdo:DockLayoutManager>
</Grid>
</Window>