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

DockManager.Docking Event

Fires repeatedly while a dock panel is being dragged.

Namespace: DevExpress.XtraBars.Docking

Assembly: DevExpress.XtraBars.v19.2.dll

Declaration

[DXCategory("Docking")]
public event DockingEventHandler Docking

Event Data

The Docking event's data class is DockingEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets whether the operation performed on the processed panel should be cancelled. Inherited from DockPanelCancelEventArgs.
Dock Gets a value indicating how the dock panel would be docked to the targeted control.
DragPoint Gets the mouse pointer’s coordinates relative to the top left corner of the screen.
Index Gets the position of the dock panel within the owning collection.
Panel Gets the processed dock panel. Inherited from DockPanelEventArgs.
TargetForm Gets the form (or user control) the panel is being docked to.
TargetPanel Gets the target panel, which the processed panel is being docked to.
TargetTabbed Identifies whether the dock panel will be turned into a tab within a tab container if it’s dropped at its current position.

Remarks

Handle the Docking event to perform actions while a dock panel is being docked. For instance, you can prevent the panel from being docked at a certain position.

End-users can dock panels to other panels that are owned by the dock manager or to the form (user control). The DockingEventArgs.TargetForm and DockingEventArgs.TargetPanel event parameters identify the target form and panel, respectively. The DockPanelEventArgs.Panel event parameter specifies the panel being docked.

To forbid the current dock operation, set the DockPanelCancelEventArgs.Cancel event parameter to true.

For more information on how the docking operations can be performed in code, see the Controlling Dock Operations document.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Docking event.

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.

See Also