c# - DragDropEffect.Copy Resets itself to None -
i have scatterviewitem
in scatterview
, manipulation not handled me. have richtextbox
in scatterview, property allowdrop = true
.
by default, richtextbox's dragenter
event fires whenever scatterviewitem drag it, correct. checked dragdropeffect here, , it's dragdropeffect.move
. drop
event fires appropriately after that.
i changed dragdropeffect move
copy
in dragenter, drop event no longer fires. checked dragdropeffect again in dragover
, somehow became none
. tried setting in dragover copy
(again) each time become none
on next trigger of dragover.
the time drop event fire if dragdropeffect set all
or move
. how change dragdropeffect.copy
, still fire drop event? did set e.handled = true
after setting dragdropeffect.copy.
edit: apologises, did manipulate svi's drag , drop little. in scatterview's onmanipulationstarted
, svi , called svi.begindragdrop(svi.datacontext)
. that's did svi.
what (drageventargs).allowedeffects
property value? can set (drageventargs).effects
property 1 of values specified (drageventargs).allowedeffects
property. if dragdropeffects.copy
not option found in (drageventargs).allowedeffects
property enumeration, not able use function.
you can set option when create data object , call dodragdrop
:
dragdrop.dodragdrop(item, dragdata, dragdropeffects.all);
update >>>
as said, normally, set allowable dragdropeffects
enumeration when call dodragdrop
... after seeing have called surfacedragcursor.begindragdrop
method, looked online @ surfacedragdrop.begindragdrop method page @ msdn , found this:
public static surfacedragcursor begindragdrop ( frameworkelement dragsource, frameworkelement draggedelement, frameworkelement cursorvisual, object data, ienumerable<inputdevice> inputdevices, dragdropeffects allowedeffects )
i'm guessing last parameter here set dragdropeffects
allowable effect enumeration.
Comments
Post a Comment