DockLayoutManager.DockOperationStarting Event
Occurs whenever a docking operation within the current DockLayoutManager is performed.
Namespace: DevExpress.Xpf.Docking
Assembly: DevExpress.Xpf.Docking.v14.2.dll
#Declaration
#Event Data
The DockOperationStarting event's handler receives an argument of the DockOperationStartingEventArgs type. The following properties provide information specific to this event:
Property | Description |
---|---|
Cancel |
Gets or sets whether the current operation must be canceled.
Inherited from Item |
Dock |
Gets the type of an operation that is processed within the Dock |
Dock |
Gets a Dock Item to which the current Dock Item is to be docked. |
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 |
Item |
Gets the currently processed item.
Inherited from Item |
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 |
#Remarks
The DockOperationStarting event is fired when a Dock Item within the current DockLayoutManager is to be docked, auto-hidden, closed, restored or made floating. Handling this event allows you to enable or cancel certain upcoming layout modifications.
The DockOperationStarting event receives an argument of the DockOperationStartingEventArgs type. Its properties allow you to determine which Dock Item is being modified, what type of operation is going to happen, and depending on this information, allow or prohibit the current operation. For example, the following code prohibits the dockPanel2 from being docked via a double mouse click on its header:
private void WindowContainer_DockOperationStarting(object sender, DevExpress.Xpf.Docking.Base.DockOperationStartingEventArgs e) {
if (e.Item == dockPanel2 && e.DockOperation == DevExpress.Xpf.Docking.DockOperation.Dock && e.DockTarget == null) e.Cancel = true;
}
If the DockOperationStarting event is not canceled, it's followed by the DockLayoutManager.DockOperationCompleted event.