DockLayoutManager.ShowingDockHints Event

Allows you to hide and disable individual dock hints.

Namespace: DevExpress.Xpf.Docking

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

Declaration

public event ShowingDockHintsEventHandler ShowingDockHints
Public Event ShowingDockHints As ShowingDockHintsEventHandler

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.

When an end user drags a dock item over dock panels, the following Dock Guides are displayed: left, top, right, bottom and central:

DockGuides

Each Dock Guide consists of a number of Dock Hints. For example, 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, etc.

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 arguments: 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