Nevron Support Team,
I think that the Custom Drag and Drop Example is fine but not very practical for my scenario, I would like to create new NShape when something is dropped in the NDrawingView rather than creating NSHape first and attach them to the .Tag as NMyDataObject
So is there a way to override the DragDrop event?
I tried to to this in the code but it only works on the edges
private void listBox1_MouseDown(object sender, MouseEventArgs e)
{
int index = listBox1.IndexFromPoint(e.X, e.Y);
object s = null;
if (index >= 0)
s = listBox1.Items[index];
if (s != null)
listBox1.DoDragDrop(s, DragDropEffects.Copy);
}
private void nDrawingView1_DragEnter(object sender, DragEventArgs e)
{
e.Effect = DragDropEffects.Copy;
}
private void nDrawingView1_DragDrop(object sender, DragEventArgs e)
{
MessageBox.Show("Drop");
}
Result is I can drag and drop in the ruler bars, but I can't drop in the main view area, see attached screenshot (I added the cursors later on the image to reflect how the cursor changes in different areas of the NDrawingView)
My question can be resumed at: Can we override the DragDrop method of the NDrawingView somwhow instead of relying only in the built in features of the control?
Thanks