Back to Devexpress

DiagramControl.CustomHitTest Event

windowsforms-devexpress-dot-xtradiagram-dot-diagramcontrol-2e35598c.md

latest2.8 KB
Original Source

DiagramControl.CustomHitTest Event

Occurs each time the cursor moves while hovering over a diagram item.

Namespace : DevExpress.XtraDiagram

Assembly : DevExpress.XtraDiagram.v25.2.dll

NuGet Package : DevExpress.Win.Diagram

Declaration

csharp
[DiagramCategory(DiagramCategory.DiagramPaint)]
public event EventHandler<CustomHitTestEventArgs> CustomHitTest
vb
<DiagramCategory(DiagramCategory.DiagramPaint)>
Public Event CustomHitTest As EventHandler(Of CustomHitTestEventArgs)

Event Data

The CustomHitTest event's data class is CustomHitTestEventArgs. The following properties provide information specific to this event:

PropertyDescription
AngleGets the angle by which the diagram item is rotated around its anchor point relative to the diagram canvas.
BoundsGets the bounds of the item to which the test points belongs.
ItemGets the item to which the test point belongs.
ItemHeightGets the height of the item to which the test point belongs.
ItemWidthGets the width of the item to which the test point belongs.
PointGets the object that represents the position of the test point relative to the item it belongs to.
ResultGets or sets whether the test point belongs to a diagram item.

Remarks

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.

See Also

DiagramControl Class

DiagramControl Members

DevExpress.XtraDiagram Namespace