- 2 minutes to read
Auto-Hide Groups (AutoHideGroup objects) are containers for auto-hidden panels. At runtime, when an end-user enables auto-hide mode for a panel by clicking the panel’s auto-hide (pin) button, an Auto-Hide Group is automatically created. The panel is added to the created Auto-Hide Group and removed from view. If you need to create auto-hidden panels in XAML, you need to manually create Auto-Hide Groups. The following image shows two Auto-Hide Groups docked to the left side of the DockLayoutManager:
Visually, auto-hide groups are represented by labels within bars at the left, right, top and bottom sides of the Dock Layout Manager container. The side at which panel labels are displayed is specified by the AutoHideGroup.DockType property.
When an end-user enables auto-hide mode for a Tabbed Group (by clicking its auto-hide (pin) button), a new Auto-Hide Group is created and the Tabbed Group’s children are all added to the created Auto-Hide Group. When an end-user disables auto-hide mode for a panel, auto-hide mode is disabled for all panels belonging to the same Auto-Hide Group, and the panels are transformed into a Tabbed Group.
Elements of an Auto-Hide Group can only be represented by Layout Panels (LayoutPanel objects). You can add multiple panels to an Auto-Hide Group, and you can create multiple Auto-Hide Groups docked to the same side of the DockLayoutManager container.
In XAML, you can create an auto-hidden panel as follows:
- Add an AutoHideGroup object to the DockLayoutManager.AutoHideGroups collection. This collection stores all Auto-Hide Groups and allows you to access all auto-hidden panels.
- Add a LayoutPanel(s) to the created AutoHideGroup.
- Specify the side at which the Auto-Hide Group will be displayed via the AutoHideGroup.DockType property.
In code, a panel can be made auto-hidden via the DockController.Hide method of the DockLayoutManager.DockController object.
A panel cannot be made auto-hidden if the BaseLayoutItem.AllowHide option is disabled. To enable auto-hide mode for a panel in code, use the DockController.Hide method of the DockLayoutManager.DockController object.
You can use the DockLayoutManager.AutoHideExpandMode property to specify the way an auto-hidden panel is expanded. It can be expanded when clicked or when hovered over with a mouse.