DockLayoutManager.ShowingDockHints Event
Allows you to hide and disable individual dock hints.
Namespace: DevExpress.Xpf.Docking
Assembly: DevExpress.Xpf.Docking.v24.2.dll
NuGet Package: DevExpress.Wpf.Docking
#Declaration
#Event Data
The ShowingDockHints event's data class is ShowingDockHintsEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Dragging |
Gets the dragged item’s owner. |
Dragging |
Gets the target of the dragged item. |
Handled |
Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.
Inherited from Routed |
Original |
Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.
Inherited from Routed |
Routed |
Gets or sets the Routed |
Source |
Gets or sets a reference to the object that raised the event.
Inherited from Routed |
The event data class exposes the following methods:
Method | Description |
---|---|
Disable |
Disables the Dock |
Disable |
Disables all Dock |
Get |
Gets whether the Dock |
Get |
Gets whether the Dock |
Hide |
Hides the Dock |
Hide |
Hides the Dock |
Hide |
Hides all Dock |
Invoke |
When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation.
Inherited from Routed |
On |
When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes.
Inherited from Routed |
#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:
Each DockGuide consists of a number of DockHints. For example, the central DockGuide consists of five DockHints: Center, CenterBottom, CenterLeft, CenterRight and CenterTop. The left Dock Guide consists of two Dock Hints: SideLeft and AutoHideLeft, etc.
Use the following ShowingDockHints event argument’s methods to disable individual Dock Guides and hide specific Dock Hints, according to your logic: DisableAll, Disable, HideAll, 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;
}
}