Back to Devexpress

AutoHideGroup Class

wpf-devexpress-dot-xpf-dot-docking-e90c75fe.md

latest9.3 KB
Original Source

AutoHideGroup Class

A container for auto-hidden dock panels.

Namespace : DevExpress.Xpf.Docking

Assembly : DevExpress.Xpf.Docking.v25.2.dll

NuGet Package : DevExpress.Wpf.Docking

Declaration

csharp
public class AutoHideGroup :
    LayoutGroup
vb
Public Class AutoHideGroup
    Inherits LayoutGroup

Remarks

AutoHideGroup objects allow you to display auto-hidden panels. These panels appear only when you hover over or click the panel’s label.

Create Auto-Hide Groups

An AutoHideGroup object can only be a child of the AutoHideGroups class.

In XAML

xaml
<Window ...
  xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
  <dxdo:DockLayoutManager>
    <dxdo:DockLayoutManager.AutoHideGroups>
      <dxdo:AutoHideGroup DockType="Right">
        <dxdo:LayoutPanel Caption="Panel1"/>
      </dxdo:AutoHideGroup>
    </dxdo:DockLayoutManager.AutoHideGroups>
  </dxdo:DockLayoutManager>
</Window>

In Code

Use the IDockController.Hide methods to auto-hide a panel.

Tip

Set a panel’s BaseLayoutItem.AllowHide property to false to disable the panel’s auto-hide mode.

csharp
DockLayoutManager1.DockController.Hide(Panel1, Dock.Right);
vb
DockLayoutManager1.DockController.Hide(Panel1, Dock.Right)

Child Items

AutoHideGroups can contain only LayoutPanel objects.

Customize Auto-Hide Groups

Use the following properties to customize an AutoHideGroup :

PropertyDescription
AutoHideSpeedSpecifies the duration of the panel’s open/close animation.
AutoHideSizeSpecifies the panel’s size in auto-hide mode.
AutoHideTypeSpecifies the panel’s position when it is hidden.
DockTypeSpecifies the panel’s position when it is expanded.
DockLayoutManager.AutoHideExpandModeSpecifies the way an auto-hidden panel is expanded: onmousedown or onhover.
DockLayoutManager.AutoHideModeSpecifies whether the auto-hide group should overlay LayoutGroups or be displayed inline.
DockLayoutManager.EnableWin32CompatibilitySpecifies whether the auto-hide panel should be displayed over a WindowsFormsHost element.
LayoutPanel.AutoHideExpandStateSpecifies the panel’s state.
SizeToContentSpecifies whether an auto-hide group’s panel should be resized according to its content.

Runtime Operations

Methods

Use the following DockLayoutManager.DockController object’s methods to control an AutoHideGroup at runtime:

MethodDescription
HideEnables the auto-hide mode for the item/panel and hides it at a corresponding edge of the DockLayoutManager container.
Restore(BaseLayoutItem)Restores a closed (hidden) panel at its previous dock position.

Events

Use the following DockLayoutManager ‘s events to control an AutoHideGroup at runtime:

EventDescription
DockLayoutManager.DockItemDockingFires before a dock item is dragged over dock hints, and allows you to prevent dock zones from being displayed.
DockLayoutManager.DockItemEndDockingFires after a dock item has been dropped, and allows you to prevent this action.
DockLayoutManager.DockItemHiddenFires after a dock item has been made auto-hidden.
DockLayoutManager.DockItemHidingFires before a dock item is auto-hidden, and allows you to prevent this action.
DockLayoutManager.DockItemRestoredFires after a dock item has been restored from the closed (hidden) state.
DockLayoutManager.DockItemRestoringFires before a dock item is restored from the closed (hidden) state, and allows you to prevent this action.
DockLayoutManager.DockItemStartDockingFires when a docking operation starts, and allows you to prevent this operation.

User Interactions

A user can click the auto-hide (pin) button to auto-hide the panel.

When a user auto-hides a TabbedGroup (clicks its auto-hide (pin) button), the DockLayoutManager creates a new Auto-Hide Group and moves all the Tabbed Group’s children to this group.

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

wpf-scheduler-use-entity-framework-to-bind-to-data/CS/DXSample/MainWindow.xaml#L30

xml
<dxdo:DockLayoutManager.AutoHideGroups>
    <dxdo:AutoHideGroup DockType="Right">
        <dxdo:LayoutPanel AllowClose="False"

wpf-dock-layout-manager-pin-unpin-layout-panels-in-mvvm/CS/MainWindow.xaml#L28

xml
<dxdo:DockLayoutManager.AutoHideGroups>
    <dxdo:AutoHideGroup DockType="Right" Name="auotHideGroup"/>
</dxdo:DockLayoutManager.AutoHideGroups>

wpf-scheduler-disable-resource-colorization/CS/DXSample/MainWindow.xaml#L42

xml
<dxdo:DockLayoutManager.AutoHideGroups>
    <dxdo:AutoHideGroup DockType="Right">
        <dxdo:LayoutPanel AllowClose="False"

Inheritance

Show 11 items

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control DevExpress.Xpf.Docking.psvFrameworkElement BaseLayoutItem LayoutGroup AutoHideGroup

See Also

AutoHideGroup Members

AutoHideGroups

DevExpress.Xpf.Docking Namespace