ShapeElement.OnClick Method
Called when the user clicks the shape.
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
Override this method to respond to mouse clicks.
As an alternative, you can add a listener to the Click event. You can do that without changing the code of the target shape. But you need to set up a separate handler for each instance.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.