Freigeben über


ShapeElement.OnClick Method

Called when the user clicks the shape.

Namespace:  Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)

Syntax

'Declaration
Public Overridable Sub OnClick ( _
    e As DiagramPointEventArgs _
)
public virtual void OnClick(
    DiagramPointEventArgs e
)
public:
virtual void OnClick(
    DiagramPointEventArgs^ e
)
abstract OnClick : 
        e:DiagramPointEventArgs -> unit 
override OnClick : 
        e:DiagramPointEventArgs -> unit 
public function OnClick(
    e : DiagramPointEventArgs
)

Parameters

Remarks

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.

.NET Framework Security

See Also

Reference

ShapeElement Class

Microsoft.VisualStudio.Modeling.Diagrams Namespace

Click

Other Resources

How to: Intercept a Click on a Shape or Decorator