I'm working with drag and drop from another control in my application. When I hold down the ctrl key, the text item copies from the other control into the syntax editor. Is there an easy way to get this to work without the user having to hold down the ctrl key?
I apologize for the delay in my response.
In order to attach a sample project to the Infragistics forums, it needs to be less than 1MB in size. If the bin and obj folders are present in the project that you are trying to attach, please delete them prior to compressing your project, as this should normally make the size less than 1MB.
If you are still unable to attach the sample, I would then recommend sending it to firstname.lastname@example.org referencing this forum thread.
Please let me know if you have any other questions or concerns on this matter.
I've removed the bin and obj folders so that it will attach. Please review and let me know what you find out. Thanks
Thank you for the sample project. I have taken a look, and I can reproduce the behavior you are seeing. I am not entirely sure, but it looks like internally, we may be expecting that a copy-operation is coming from a “text editor” type of source, and so we expect that the Ctrl key is pressed when trying to handle a “Copy” drag-drop operation.
I have found a workaround to this, in that if in the PreviewMouseLeftButtonDown event in your ATLDragDrop class, you pass the “data” parameter as a string and set the DragDropEffects to be “All” instead of “Copy,” the drag works normally without the need to press the Ctrl key. I am unsure why exactly this is at the moment, to be honest, but I am attaching a modified version of the sample project you sent to demonstrate.
I hope this helps. Please let me know if you have any other questions or concerns on this matter.