Raised when custom hit testing of item's adjustment handles must be performed.
Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf
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 Point specifying the mouse cursor position. | |
Set this property to the index of the adjustment handle that has been hit. |
For links, set the result to the index of the link's control point that has been hit. For nodes, set the result to 0, 1, 2, 3 for the corner resize handles, 4, 5, 6, 7 for the side center resize handles, 8 for the move handle and 9 for the rotation handle.
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 = 8; } } } |
Visual Basic Copy Code |
---|
Private Sub diagram_HitTestAdjustmentHandles(ByVal sender As Object, ByVal e As HitTestEventArgs) Handles diagram.HitTestAdjustmentHandles |
WpfDiagram Programmer's Guide | © 2024 MindFusion |