Occurs each time the cursor moves while hovering over a diagram item.
[DiagramCategory(DiagramCategory.DiagramPaint)] public event EventHandler<CustomHitTestEventArgs> CustomHitTest
<DiagramCategory(DiagramCategory.DiagramPaint)> Public Event CustomHitTest As EventHandler(Of CustomHitTestEventArgs)
The CustomHitTest event's data class is CustomHitTestEventArgs. The following properties provide information specific to this event:
|Angle||Gets the angle by which the diagram item is rotated around its anchor point relative to the diagram canvas.|
|Bounds||Gets the bounds of the item to which the test points belongs.|
|Item||Gets the item to which the test point belongs.|
|ItemHeight||Gets the height of the item to which the test point belongs.|
|ItemWidth||Gets the width of the item to which the test point belongs.|
|Point||Gets the object that represents the position of the test point relative to the item it belongs to.|
|Result||Gets or sets whether the test point belongs to a diagram item.|
The CustomHitTest event allows you to implement a custom hit testing logic. It is mainly designed to be used with the DiagramControl.CustomDrawItem event.
Setting the event's CustomHitTestEventArgs.Result property to false prevents the end-user from selecting the diagram item hovered by the pointer.