Wpf – Why the WPF application has Drag & Drop disabled (even when AllowDrop is true)

drag and dropwpf

My WPF application inhibits the Drop of files from Windows Explorer, showing a Stop-sign cursor.

I've tried setting the AllowDrop property (that of the UIElement ancestor) to true on the main window and contained controls, but no luck at all, no drag-drop events are fired.

Any ideas or suggestions to find the cause?

Best Answer

Solved!

The problem was that executing my app thru VisualStudio (run/debug) prevented the interop with Windows' drag & drop mechanism. Running the App as stand-alone makes it work, but cannot debug interactively.

This answer helped a lot: Visual Studio 2010 WPF Project ran in debug or relase will not allow drag and drop to any control

Related Topic