wpf dragenter/dragleave problem
I am writing an WPF application, with drag and drop support within controls in the app, and also drag and drop between my desktop file and my app. I use adorner to change my mouse cursor.
The internal dragdrop operation between controls has no problem. The problem is dragdrop between desktop file and my app.
I set a DragEnter and DragLeave handler for my Window. When I drag a file into my app, DragEnter fired, but it's not just fired once, but keep firing with DragLeave alternatively on my application window.
What I already achieve is, I can manage to drag file into my app, with desired adorner; but if i keep holding the mouse and drag the file back to desktop, the adorner just stuck in the corner. I can't clear the adorner by using DragLe开发者_如何学Pythonave, because the DragLeave event is firing non stop when I drag mouse in my app.
I want the DragLeave to fired only when the mouse cursor drag leave my application.
Any workaround?
Here is a possible workaround that you could do for this scenario. DragDrop - DragEnter/DragLeave Events keep firing
精彩评论