gpt4 book ai didi

wpf - 为什么我的 WPF 应用程序禁用了拖放(即使 AllowDrop 为 true)?

转载 作者:行者123 更新时间:2023-12-04 03:01:13 36 4
gpt4 key购买 nike

我的 WPF 应用程序禁止从 Windows 资源管理器中删除文件,显示一个停止符号光标。

我尝试在主窗口和包含的控件上将 AllowDrop 属性(UIElement 祖先的属性)设置为 true,但根本没有运气,没有触发任何拖放事件。

有什么想法或建议可以找到原因吗?

最佳答案

解决了!

问题是通过 VisualStudio(运行/调试)执行我的应用程序阻止了与 Windows 拖放机制的互操作。将应用程序作为独立运行可使其工作,但无法进行交互调试。

这个答案有很大帮助:
Visual Studio 2010 WPF Project ran in debug or relase will not allow drag and drop to any control

关于wpf - 为什么我的 WPF 应用程序禁用了拖放(即使 AllowDrop 为 true)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18029077/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com