ShapeElement.DoHitTest Method (PointD, DiagramHitTestInfo)
Returns true if the specified point is within the shape.
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll)
Syntax
'Declaration
Public Function DoHitTest ( _
point As PointD, _
hitTestInfo As DiagramHitTestInfo _
) As Boolean
public bool DoHitTest(
PointD point,
DiagramHitTestInfo hitTestInfo
)
public:
bool DoHitTest(
PointD point,
DiagramHitTestInfo^ hitTestInfo
)
member DoHitTest :
point:PointD *
hitTestInfo:DiagramHitTestInfo -> bool
public function DoHitTest(
point : PointD,
hitTestInfo : DiagramHitTestInfo
) : boolean
Parameters
point
Type: Microsoft.VisualStudio.Modeling.Diagrams.PointDA point on the diagram, relative to the parent shape.
hitTestInfo
Type: Microsoft.VisualStudio.Modeling.Diagrams.DiagramHitTestInfoThe object that will receive the results of the hit test.
Return Value
Type: Boolean
true if the shape was hit; otherwise, false.
Remarks
If the method returns true, the hiTestInfo indicates the DiagramItem that was actually hit, which might be a child of the shape.
Instead of calling this directly from a command, consider overriding OnClick() or OnDoubleClick(), in which the HitTestInfo is included in the event argument.
.NET Framework Security
- 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.