问题
Is it possible to prevent the Silverlight Toolkit DataGridDragDropTarget from starting a drag-action?
What I whant is to use one DataGrid only as DragSource and another one only as DropTarget. And the DropTarget-only-DataGrid should not show this "StartDragShadow" when pressing and moving the mouse over an item.
回答1:
Just set the AllowedSourceEffects
attribute of the toolkit:DataGridDragDropTarget
control to "None"
:
<toolkit:DataGridDragDropTarget AllowDrop="true" AllowedSourceEffects="None">
<sdk:DataGrid Name="DropTarget" />
</toolkit:DataGridDragDropTarget>
来源:https://stackoverflow.com/questions/2966724/prevent-datagriddragdroptarget-from-showing-drag-shadow