windowsforms-devexpress-dot-xtragantt-dot-ganttcontrol-dot-calchitinfo-x28-system-dot-drawing-dot-point-x29.md
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
public GanttControlHitInfo CalcHitInfo(
Point pt
)
Public Function CalcHitInfo(
pt As Point
) As GanttControlHitInfo
| Name | Type | Description |
|---|---|---|
| pt | Point |
A Point structure that specifies the hit point relative to the control’s upper-left corner.
|
| Type | Description |
|---|---|
| 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
if(e.Button == MouseButtons.Left) {
GanttControlHitInfo hitInfo = control.CalcHitInfo(e.Location);
if(hitInfo.ChartHitTest?.ItemInfo != null) {
See Also