Visual Studio 2010 WPF Project ran in debug or release will not allow drag and drop to any control

别来无恙 提交于 2019-12-03 18:07:58

问题


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.

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>

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.

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?


回答1:


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



来源:https://stackoverflow.com/questions/7485909/visual-studio-2010-wpf-project-ran-in-debug-or-release-will-not-allow-drag-and-d

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