Does the same error occur when you use the following simple code?
private void Ellipse_MouseMove(object sender, MouseEventArgs e)
{
Ellipse ellipse = sender as Ellipse;
if (ellipse != null && e.LeftButton == MouseButtonState.Pressed)
{
DragDrop.DoDragDrop(ellipse,
ellipse.Fill.ToString(),
DragDropEffects.Copy);
}
}
It seems that there are many possible causes of this problem, such as Windows version, too old assembly and some other reasons, please check if there is any suitable for your current situation.
Drag and Drop sometimes causing a crash
ExecutionEngineException (80131506) in mscorlib.dll when processing asp:ScriptManager
Citrix Virtual Memory Optimization Service can lead to .NET application corruption
If neither, please provide us with a simple project that can reproduce the problem so that we can try to solve it.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.