在调试或发布版本中运行的Visual Studio 2010 WPF项目将不允许拖放到任何控件 [英] Visual Studio 2010 WPF Project ran in debug or release will not allow drag and drop to any control

查看:105
本文介绍了在调试或发布版本中运行的Visual Studio 2010 WPF项目将不允许拖放到任何控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里提出了一个问题: WPF拖动并将文件从Windows资源管理器拖放到TreeView上,但我刚刚发现这是一个我认为是完全不同的问题.

I had started a question here: WPF drag and drop files onto TreeView from windows explorer but I just discovered this is a totally different problem that what I thought it was.

我有一个非常简单的测试用例.

I have an extremely simple test case.

我正在使用树状视图,但是如果我使用简单的列表框没有代码,则仅使用以下xaml

I was using a treeview but if I use a simple listbox with no code just the following xaml

<StackPanel Orientation="Vertical">
    <ListBox Height="312" Background="#FFBDD6FF" AllowDrop="True"/>
</StackPanel>

如果我在 expression blend 中运行项目并将文件拖到列表框上,我会看到箭头和其下方的小方块,表明可以拖放.

If I run the project in expression blend and drag a file over the listbox I see the arrow and the little square below it that incdicates you can drag and drop.

如果我在 visual studio 中运行相同的项目,并将文件拖到列表框上,则会出现一个黑眼圈,其中有一行.

If I run the same project in visual studio and drag a file over the listbox I get a black circle with a line through it.

导致我的计算机或代码出现问题的原因是什么?

What could be wrong with my computer or code that is causing that?

推荐答案

是否有可能以管理员身份运行Visual Studio并正常运行Expression Blend?

Is it possible that you are running Visual Studio as Administrator and Expression Blend normally?

这篇关于在调试或发布版本中运行的Visual Studio 2010 WPF项目将不允许拖放到任何控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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