本文介绍了防止DataGridDragDropTarget显示“Drag Shadow”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以防止Silverlight Toolkit DataGridDragDropTarget启动拖动操作?
Is it possible to prevent the Silverlight Toolkit DataGridDragDropTarget from starting a drag-action?
我只是将一个DataGrid作为DragSource使用,另一个仅作为DropTarget的。而DropTarget-only-DataGrid在按住鼠标悬停在一个项目上时不应显示StartDragShadow。
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.
推荐答案
将工具包的
控件到 AllowedSourceEffects
属性设置为:DataGridDragDropTarget 无
:
Just set the AllowedSourceEffects
attribute of the toolkit:DataGridDragDropTarget
control to "None"
:
<toolkit:DataGridDragDropTarget AllowDrop="true" AllowedSourceEffects="None">
<sdk:DataGrid Name="DropTarget" />
</toolkit:DataGridDragDropTarget>
这篇关于防止DataGridDragDropTarget显示“Drag Shadow”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!