Hi Jon,
You could do so by handling the MouseDown event of the BarControlInternal associated with the XPToolBar as shown below in code :
((BarControlInternal)this.xpToolBar1).MouseDown += new MouseEventHandler(XPToolBar_BarControlInternal_MouseDown);
private void XPToolBar_BarControlInternal_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
BarControlInternal bcint = sender as BarControlInternal;
Point pt = bcint.PointToScreen(new Point (e.X,e.Y));
BarItem bitem = bcint.HitTest(pt.X, pt.Y) as BarItem;
Console.WriteLine(bitem.Text);
}
}
Please refer to the
test sample attached that illustrates the above and let me know if this works for you.
Regards,
Guru Patwal
Syncfusion, Inc.