I've got it
. First I had to add a handler for the drawingview:
AddHandler DrawingView.MouseDown, AddressOf DrawingView_MouseDown
And this is the code for de sub
Private Sub DrawingView_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DrawingView.MouseDown
Dim ActiveShape As Object = DrawingView.LastActiveDocumentContentHit(DrawingView.GetMousePositionInDevice(), -1, Nevron.Diagram.Filters.NFilters.TypeNShape)
Dim XShape As NShape = CType(ActiveShape, NShape)
If e.Button = Windows.Forms.MouseButtons.Right And Not XShape Is Nothing Then
ContextMenuStripTree.Show(DrawingView, CInt(e.X), CInt(e.Y))
End If
End Sub