Hello Mayer,
Please find my response on your queries provided below.
1. What I need is to catch the right click event on the node.
If your intention is to catch the right click event on a node, you can use Diagram.MouseUp() event. Below is the sample code snippet for your reference.
Private Sub diagram1_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs)
If e.Button = Windows.Forms.MouseButtons.Right AndAlso m_bShowMenu Then
If Me.diagram1.Controller.NodesHit.Count > 0 Then
'code here
Else
'code here
End If
End If
End Sub
2. I can catch any click event in "OnSelectionChanged" event, but how can I recognize there the doubleclick event?
Is any other solution rather than "OnSelectionChanged" event?
If your intention is to catch double click event either on the diagram or on a node, you can use Diagram.DoubleClick() event. If you want to catch the double click event on custom node type, you can override the OnDoubleClick() method within the custom node class.
Below is the sample code snippet for your reference.
Private Sub Diagram1_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Diagram1.DoubleClick
If Me.diagram1.View.SelectionList.Count > 0 Then
' code here
Else
'code here
End If
End Sub
I hope the above details are helpful to you.
Thanks for your continued support to Syncfusion products.
Best Regards,
Meera.
Syncfusion, Inc.
http://www.syncfusion.com/