Back to Devexpress

GanttControl.CalcHitInfo(Point) Method

windowsforms-devexpress-dot-xtragantt-dot-ganttcontrol-dot-calchitinfo-x28-system-dot-drawing-dot-point-x29.md

latest2.4 KB
Original Source

GanttControl.CalcHitInfo(Point) Method

Returns information about the visual element under the specified hit point.

Namespace : DevExpress.XtraGantt

Assembly : DevExpress.XtraGantt.v25.2.dll

NuGet Package : DevExpress.Win.Gantt

Declaration

csharp
public GanttControlHitInfo CalcHitInfo(
    Point pt
)
vb
Public Function CalcHitInfo(
    pt As Point
) As GanttControlHitInfo

Parameters

NameTypeDescription
ptPoint

A Point structure that specifies the hit point relative to the control’s upper-left corner.

|

Returns

TypeDescription
GanttControlHitInfo

A GanttControlHitInfo object that contains information about the visual element under the specified hit point.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CalcHitInfo(Point) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

xaf-win-gantt-control/CS/XPO/GanttSolutionXPO/GanttSolutionXPO.Win/Editors/CustomGanttEditor.cs#L102

csharp
if(e.Button == MouseButtons.Left) {
    GanttControlHitInfo hitInfo = control.CalcHitInfo(e.Location);
    if(hitInfo.ChartHitTest?.ItemInfo != null) {

See Also

GanttControl Class

GanttControl Members

DevExpress.XtraGantt Namespace