Drag and Drop in WPF not working for DataFormats.FileDrop

独自空忆成欢 提交于 2019-12-24 15:42:44

问题


I am developing WPF application, with severals drag and drop support.

In my application has several controls: listView_A, listView_B, and radioButtons.

my drag and drop works if I drag item from listView_A -> listView_B, listView_A -> radioButtons etc.

But I am unable to drag file from windows to all of these controls (listview and radiobuttons), it just display a "no entry" cursor.

All of the controls has "AllowDrop" set to True.

I had tried all options I had, please help.


回答1:


It is a known issue if you are using Windows Vista or Windows 7. Here is a similar question on StackOverflow:

C# Drag drop does not work on windows 7




回答2:


The process detailed here: http://blogs.msdn.com/b/mossbiz/archive/2010/06/10/add-an-assembly-to-the-global-assembly-cache-on-windows-server-2008-r2.aspx seems like it might solve the problem.



来源:https://stackoverflow.com/questions/4364556/drag-and-drop-in-wpf-not-working-for-dataformats-filedrop

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