Method DoDragDrop
DoDragDrop(DependencyObject, IDataObject, DragDropEffects)
Initiates a drag-and-drop operation.
public static DragDropEffects DoDragDrop(DependencyObject dragSource, IDataObject dataObject, DragDropEffects allowedEffects)
Parameters
dragSource
DependencyObjectA reference to the dependency object that is the source of the data being dragged.
dataObject
IDataObjectA data object that contains the data being dragged.
allowedEffects
DragDropEffectsOne of the DragDropEffects values that specifies permitted effects of the drag-and-drop operation.
Returns
- DragDropEffects
One of the DragDropEffects values that specifies the final effect that was performed during the drag-and-drop operation.
Remarks
Call this method instead of System.Windows.DragDrop.DoDragDrop because this method handles IDataObject better.