I have a WPF application where I'm dragging an file object around. It can be dropped either into several windows inside of the application, or externally into Explorer and onto the desktop and a few other places.
The drag and drop operation works fine, but the DragDropEffect only shows properly inside of the application Window. When the cursor moves outside of the App window I get the 'verboten' icon - most of the time. Depending on how the cursor leaves the app most of the time I get the slashed out circle. But sometimes it correctly continues dragging with the copy icon.
var files = new[] {editor.MarkdownDocument.Filename} ;
var dragData = new DataObject(DataFormats.FileDrop,files);
DragDrop.DoDragDrop(tab, dragData, DragDropEffects.Copy);
As mentioned the code and the handling by the shell works properly - the file is copied, it's only the drag icon that's the problem.
I can control the drag icon inside of the application, no problem on the window, but I have no control what happens outside of it.
So how do I control the drag icon reliably external to WPF?