Silverlight DragDropTarget - 只是复制,而不是移动

时间:2011-07-06 09:44:15

标签: .net silverlight drag-and-drop

我想问一下,如果我使用DragDropTargets,我怎么能在Silverlight中只使用拖放功能复制一个项目,而不是移动?


我认为:Silverlight Toolkit Drag Drop (Part 2): Customizing Drag and Drop Behavior

1 个答案:

答案 0 :(得分:2)

我想你需要为source * DragDropTarget元素设置AllowedSourceEffects属性,如下所示:

<toolkit:PanelDragDropTarget VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" AllowedSourceEffects="Copy">
 <!-- here is a panel -->
</toolkit:PanelDragDropTarget>