The primary issue is the CodeEditor control's DragDrop event is not being raised when something (a WinForms TreeView node for example) is dragged and dropped on it. The DragDrop event is raised when using the same code with a WinForms TextBox control. See attached VB.Net project for a small example of the issue.
Another less important bug is the cursor and 'drag effect' handling of the CodeEditor control. Note that in the example project the cursor does not behave as expected when dragging over the CodeEditor (before dropping) compared to the TextBox control. It displays a generic cursor instead of the specific "DragDropEffects.Copy" effect that is specified in the code. The cursor effect does not work at all on the CodeEditor if "DragDropEffects.All" is not specified in the DoDragDrop function. These issues prevent the correct effects from being displayed in situations were different actions might be taken by the code. Also, these issues prevent the program from limiting the types of DragDrop events that are allowed between certain controls.
Simple example of the issues (VB.Net project)
Logged In: NO
I too have experienced this problem.
Logged In: YES
user_id=1935520
Originator: NO
Hi,
I had the same issue and found the problem. In the file EditViewControl.cs, line 3.475, in the method:
protected override void OnDragDrop(DragEventArgs drgevent)
the line:
string s = drgevent.Data.GetData(typeof(string)).ToString();
assumes that the data dragged can be converted to a string, so if you drag a file for example, an exception is thrown and the event is not fired.
To solve the problem you need to check the data present, for example to avoid the exception when a file is droped:
if (!drgevent.Data.GetDataPresent(DataFormats.FileDrop))
{
}
or better, check if any data convertible to string is present.