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?
Hello Andy,
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.
XamSyntaxEditorDragDropFromListBox.zip
Hi Andrew,
I've removed the bin and obj folders so that it will attach. Please review and let me know what you find out. Thanks
AndyXamSyntaxEditorDragDropFromListBox2.zip
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 support@infragistics.com referencing this forum thread.
Please let me know if you have any other questions or concerns on this matter.
Still waiting on how to get you the sample project I've put together. Thanks
Andy
Hey Andrew,
I've put together a sample project which represents what is going on in our project. We use the "ATLDragAndDrop" class for all out listboxes and it allows us to drag to any other control from a listbox without holding the ctrl key.
I've put together a sample solution but I am unable to attach it. I've tried a few different browsers and it keeps giving an error.
Please let me know how to get the sample to you. Thanks