I have a ScatterViewItem in the Scatterview, whose manipulation is not handled by me. I also have a RichTextBox in the ScatterView, with property AllowDrop = True.
By default, the RichTextBox's DragEnter event fires whenever the ScatterViewItem is drag into it, which is correct. I checked DragDropEffect here, and it's DragDropEffect.Move. The Drop event fires appropriately after that.
I changed the DragDropEffect from Move to Copy in DragEnter, but the Drop event no longer fires. I checked the DragDropEffect again in DragOver and it somehow became None. I tried setting it in DragOver to Copy (again) but each time it will just become None by itself on the next trigger of DragOver.
The only time Drop event will fire is if DragDropEffect is set to All or Move. How do I change it to DragDropEffect.Copy and still fire the Drop event? I did set e.Handled = true after setting to DragDropEffect.Copy.
EDIT:
My apologises, I did manipulate the svi's drag and drop a little. In the ScatterView's OnManipulationStarted, I get the svi and called svi.BeginDragDrop(svi.DataContext). That's all I did to the svi.
What is the
(DragEventArgs).AllowedEffectsproperty value? You can only set the(DragEventArgs).Effectsproperty to one of the values specified by the(DragEventArgs).AllowedEffectsproperty. IfDragDropEffects.Copyis not an option found in the(DragEventArgs).AllowedEffectsproperty enumeration, then you will not be able to use that function.You can set that option when you create your data object and call
DoDragDrop:UPDATE >>>
As I said, normally, you set the allowable
DragDropEffectsenumeration when you callDoDragDrop... after seeing that you have called theSurfaceDragCursor.BeginDragDropmethod, I looked online at the SurfaceDragDrop.BeginDragDrop Method page at MSDN and found this:I'm guessing that the last parameter here is where you set the
DragDropEffectsallowable effect enumeration.