Skip to main content
A newer version of this page is available. .

NavBarHitInfo.InLink Property

Gets a value indicating whether the test point is over a link.

Namespace: DevExpress.XtraNavBar

Assembly: DevExpress.XtraNavBar.v19.1.dll

Declaration

Property Value

Type Description
Boolean

true if the test point is over a link; otherwise false.

Remarks

You can also determine whether the test point is either over a link caption or link image. Use the NavBarHitInfo.HitTest property for this purpose.

Use the NavBarHitInfo.Link property to get the link over which the point rests.

Example

The following sample code represents a handler for the MouseMove event. It calculates hit information for the mouse pointer’s position via the NavBarControl.CalcHitInfo method. Then, the link that is hovered over is accessed.

using DevExpress.XtraNavBar;

private void navBarControl1_MouseMove(object sender, MouseEventArgs e) {
   NavBarHitInfo hitInfo = navBarControl1.CalcHitInfo(new Point(e.X, e.Y));
   if (hitInfo.InLink) {
      NavBarItemLink link = hitInfo.Link;
      // perform operations on the link here
      //...
   }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the InLink property.

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.

See Also