Method DoDragDrop
DoDragDrop(DependencyObject, IDataObject, DragDropEffects)
Initiates a drag-and-drop operation.
public static DragDropEffects DoDragDrop(DependencyObject dragSource, IDataObject dataObject, DragDropEffects allowedEffects)
Parameters
dragSourceDependencyObjectA reference to the dependency object that is the source of the data being dragged.
dataObjectIDataObjectA data object that contains the data being dragged.
allowedEffectsDragDropEffectsOne 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.