Skip to main content

DockLayoutManager.DockItemDragging Event

Fires repeatedly while a dock panel is being dragged.

Namespace: DevExpress.Xpf.Docking

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

NuGet Package: DevExpress.Wpf.Docking

Declaration

public event DockItemDraggingEventHandler DockItemDragging

Event Data

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

Property Description
Cancel Gets or sets whether the current operation must be canceled. Inherited from ItemCancelEventArgs.
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 RoutedEventArgs.
Item Gets the currently processed item. Inherited from ItemEventArgs.
OriginalSource Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
RoutedEvent Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
ScreenPoint Gets the current point at which the item is being dragged.
Source Gets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.

The event data class exposes the following methods:

Method Description
InvokeEventHandler(Delegate, Object) 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 RoutedEventArgs.
OnSetSource(Object) 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 RoutedEventArgs.

Remarks

Handle the DockItemDragging event to perform actions while a dock panel is being dragged.

The event’s Item parameter always refers to a float group.

When a panel is docked and an end-user starts dragging it, a float group is immediately created containing the dock panel. So, the dock panel is immediately made floating. The DockItemDragging event will fire with the Item parameter referring to the created float group. To access dock panels nested within the float group, use the float group’s LayoutGroup.Items collection.

The current drag operation can be canceled by setting the Cancel event parameter to true.

See Also