Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic NodeCreating event not firing (Read 1737 times)
PeteWhite
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Apr 7th, 2020
NodeCreating event not firing
Apr 7th, 2020 at 3:03pm
Print Post  
Hi All,

I am currently evaluation the Diagramming for WinForms component (v6.6) and I must say I am very impressed.

One thing though, I am using the NodeListView to allow the user to drag ShapeNodes onto the DiagramView, however, the NodeCreating event doesn't seem to be firing.

I want to be able to restrict the user to only one instance of certain nodes.

Any assistance would be appreciated.

Cheers,

Pete
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: NodeCreating event not firing
Reply #1 - Apr 8th, 2020 at 6:13am
Print Post  
Hi,

That raises drag-and-drop events, you can check node type from DragOver handler like this -

Code
Select All
void diagramView_DragOver(object sender, DragEventArgs e)
{
	e.Effect = DragDropEffects.Copy;
	var draggedNode = e.Data.GetData(typeof(DraggedNode)) as DraggedNode;
	if (draggedNode != null && draggedNode.Node is TableNode)
		e.Effect = DragDropEffects.None;
} 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
PeteWhite
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Apr 7th, 2020
Re: NodeCreating event not firing
Reply #2 - Apr 9th, 2020 at 10:27am
Print Post  
Thanks, that gave me a good starting point to sort it out.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint