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

DockLayoutManager.ShowingDockHints Event

Allows you to hide and disable individual dock hints.

Namespace: DevExpress.Xpf.Docking

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

Declaration

public event ShowingDockHintsEventHandler ShowingDockHints

Event Data

The ShowingDockHints event's data class is DevExpress.Xpf.Docking.Base.ShowingDockHintsEventArgs.

Remarks

The event fires when you drag a dock item over the dock UI. Dock hints are displayed while dragging, helping an end-user decide where to drop the item.

There are five Dock Guides displayed when dragging over panels: left, top, right, bottom and central:

DockGuides

Each Dock Guide consists of a number of Dock Hints. For instance, the central Dock Guide consists of five Dock Hints: Center, CenterBottom, CenterLeft, CenterRight and CenterTop. The left Dock Guide consists of two Dock Hints: SideLeft and AutoHideLeft, and so on.

The ShowingDockHints event allows you to disable individual Dock Guides and hide specific Dock Hints, according to your logic. This can be accomplished via the methods provided by the event’s parameter: DisableAll, Disable, HideAll and Hide.

The following example shows how to handle the ShowingDockHints event:

void OnShowingDockHints(object sender, ShowingDockHintsEventArgs e) {
    // Hide all Dock Guides while dragging a panel over Panel1
    if(object.Equals(e.DraggingTarget, Panel1)) {
        e.HideAll();
        return;
    }
    // Do not do anything while dragging over Panel2
    if(object.Equals(e.DraggingTarget, Panel2)) {
        return;
    }
    // Disable all Dock Hints while dragging over Panel3
    if(object.Equals(e.DraggingTarget, Panel3)) {
        e.DisableAll();
        return;
    }
    // Disable and hide individual Dock Hints and Dock Guides while dragging over Panel4
    if(object.Equals(e.DraggingTarget, Panel4)) {
        e.Disable(DockHint.SideLeft);
        e.Disable(DockHint.AutoHideLeft);
        e.Disable(DockHint.CenterLeft);
        e.Disable(DockHint.CenterRight);
        e.Hide(DockGuide.Top);
        e.Hide(DockGuide.Bottom);
        return;
    }
}
See Also