WPF中的拖放不适用于DataFormats.FileDrop [英] Drag and Drop in WPF not working for DataFormats.FileDrop

查看:534
本文介绍了WPF中的拖放不适用于DataFormats.FileDrop的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我的应用程序中有几个控件:listView_A,listView_B和radioButtons。



如果我从listView_A - > listView_B,listView_A - > radioButtons等拖动项目,我的拖放工作可以。



但是我无法将文件从windows拖动到所有这些控件(listview和radiobuttons),它只显示一个no entry光标。



所有的控件都将AllowDrop设置为True。



我尝试过所有的选项,请帮助。

解决方案

如果您使用 Windows Vista Windows 7 。这是StackOverflow上的一个类似的问题:



C#拖放在Windows 7上不起作用


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.

解决方案

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

这篇关于WPF中的拖放不适用于DataFormats.FileDrop的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆