I have two different Windows PC's that I use for development. One one of the two, when I run my application through the Visual Studio interface (by simply pressing Start), the Drag Over method is never called, nor is the Drop method. On the second machine, the exact same code performs as expected, allowing drag and drop. Another twist - on the failing machine, if I compile the application and then run the compiled version from outside of Visual Studio, it works as designed.
Do you have any suggestions on what needs to change on my failing machine to allow this functionality to be demonstrated and tested from within Visual Studio?
Thanks
Scott
I am seeing the same issue with a .NET 4.7.2 application using Infragistics WPF4 v12.2.20122.2022 in Visual Studio 2019.The delegate registered to the DragDropManager.DragSource.Drop event is never called, but only when the debugger is attached. Launching without the debugger it acts normally, so the event is registered. Attaching in that session breaks it. Detaching from the same session then fixes it.Based on your' and Andrey's comments, in Visual Studio 2019 the following feature seems to be related to XAML Hot Reload for WPF. Note the XAML debugging options have changed since VS2017. Disabling this feature resolves the issue.Options -> Debugging -> Hot Reload -> XAML Hot Reload -> WPFI don't think we're really taking advantage of XAML Hot Reload, so knowing how to bypass the issue may be enough for us, but it would be better to have this issue understood fully and resolved if possible.
Hi Scott,
I had the same issue under Visual Studio 2017. Disabling debugging tools for XAML helped me. Just simply uncheck Options -> Debugging -> General -> Enable UI Debugging Tools for XAML.
Best regards,
Andrey
Hello Scott,
I have done an initial investigation into the issue that you are seeing, and at the moment, I'm unsure why this would fail in Visual Studio when in debug mode, but work normally when not. There are a few pieces of information I would like to gather from you in this case though. Would it be possible for you to please provide some information regarding the following?
1. Can you please confirm that you are using the Infragistics Drag and Drop Framework in this case? This is more of a sanity check, but the event names that you have listed are the same as the built-in WPF Drag and Drop frameworks, and so I would just like to be sure.
2. Which version of Visual Studio is the failing machine using? Have you tested on other versions of Visual Studio as well?
3. What operating system is the failing machine using?
4. Assuming that point 1 is confirmed, what is the specific version of Infragistics for WPF controls that you are using?
If I had to guess at this, I would say that it seems like the debugger in Visual Studio is somehow stealing focus, or perhaps the XAML debug tools in Visual Studio 2017 are turned on and are somehow interfering with the drag and drop framework. I cannot say for sure at the moment, but the pieces of information listed above may help.
Please let me know if you have any other questions or concerns on this matter.