NavBarHitInfo.InGroup Property
Gets a value indicating whether the test point is over a group.
Namespace: DevExpress.XtraNavBar
Assembly: DevExpress.XtraNavBar.v24.2.dll
Declaration
Property Value
Type | Description |
---|---|
Boolean | true if the test point is over a group’s client area or group’s caption; otherwise false. |
Remarks
You can also use the NavBarHitInfo.InGroupCaption property to determine whether the test point is over a group caption. Note that if the test point is over a group caption, both the NavBarHitInfo.InGroupCaption and InGroup properties return true.
You can also determine whether the test point is over a group caption button (this is not supported in all paint styles). Use the NavBarHitInfo.HitTest property for this purpose.
Use the NavBarHitInfo.Group property to obtain the group over which the test 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 group 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.InGroup) {
NavBarGroup group = hitInfo.Group;
// perform operations on the group here
//...
}
}