Raised when custom hit testing of item’s adjustment handles must be performed.
Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming
C# Copy Code |
---|
public event EventHandler<HitTestEventArgs> HitTestAdjustmentHandles |
Visual Basic Copy Code |
---|
Public Event HitTestAdjustmentHandles As EventHandler(Of HitTestEventArgs) |
HitTestAdjustmentHandles event handlers receive an argument of type HitTestEventArgs. The following HitTestEventArgs members provide information relevant to the event:
Member name | Description |
---|---|
A DiagramItem whose adjustment handles should be hit tested. | |
A PointF specifying the mouse cursor position. | |
Set this property to an AdjustmentHandle instance representing the handle that has been hit. |
For links, set the result to a LinkAdjustmentHandle initialized with the index of the link's control point that has been hit. For nodes, set the result to a NodeAdjustmentHandle initialized with a NodeHandleType enumeration member.
C# Copy Code |
---|
void diagram_HitTestAdjustmentHandles(object sender, HitTestEventArgs e) { ShapeNode shapeNode = e.Item as ShapeNode; if (shapeNode != null) { if (shapeNode.Bounds.Contains(e.MousePosition)) { // Always move e.HitResult = new NodeAdjustmentHandle(NodeHandleType.Move); } } } |
Visual Basic Copy Code |
---|
Private Sub diagram_HitTestAdjustmentHandles(ByVal sender As Object, ByVal e As HitTestEventArgs) Handles diagram.HitTestAdjustmentHandles |