You should subscribe to the NodeMouseDown
event of the drawing document's event sink service:
document.EventSinkService.NodeMouseDown += OnEventSinkServiceNodeMouseDown;
This is a bubbling event that starts at the hit node (which is usually a diagram primitive) and bubbles up to the drawing document. The argument passed to the event handler contains a property Button
for detecting the used mouse button and properties HitNode
that indicate the clicked node and the current node. When the event is bubbling up, the event handler is called multiple times and the Node
property is changed on each call, but the HitNode
stays the same.
In the event handler if the Node
is the one you are interested in, then you should take the proper action, for example to open a web page in the default web browser in your case.
Nevron Support Team