问题
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