Skip to main content
All docs
V26.1
  • Bar

    BarManager.GetItemAt(Point) Method

    Returns the bar item at the specified screen coordinates.

    Namespace: DevExpress.XtraBars

    Assembly: DevExpress.XtraBars.v26.1.dll

    Declaration

    public virtual BarItem GetItemAt(
        Point screenPoint
    )

    Parameters

    Name Type Description
    screenPoint Point

    Screen coordinates.

    Returns

    Type Description
    BarItem

    The bar item at the specified screen coordinates.

    Remarks

    The following code snippet handles the ItemClick event to obtain the clicked bar item:

    barManager1.ItemClick += (sender, e) => {
        BarItem item = barManager1.GetItemAt(Cursor.Position);
        Debug.WriteLine(item.Caption);
    };
    
    See Also