Prevent DataGridDragDropTarget from Showing “Drag Shadow”

我的梦境 提交于 2020-01-03 02:26:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!