Dragging happens from "source" to "target". When the source calls DoDragDrop() with allowedEffects as DragDropEffects.Copy, then I'm able to cancel the drop by setting Effects = DragDropEffects.None at the target (in DragOver event).
But the same situation fails when I set my allowedEffects as DragDropEffects.Move.
To reproduce the situation, download the sample from http://jaimersamples.members.winisp.net/samples/dragdrop/drag.zip
Change line.. (to DragDropEffects.Move)
DragDrop.DoDragDrop(this.DragSource, data, DragDropEffects.Copy);
Add line..
void Window1_DragOver(object sender, DragEventArgs args)
{
args.Effects = DragDropEffects.None;
And also comment out the entire, DragSource_GiveFeedback..
void DragSource_GiveFeedback(object sender, GiveFeedbackEventArgs e)
{
//System.Diagnostics.Debug.WriteLine("DragSource_GiveFeedback " + e.Effects.ToString());
Is there some kind of bug in the framework, or am I just not able to see something obvious?