标签:style os for io div re
添加一个barManager控件
添加一个popupMenu1控件
设置PopupMenu的Manager属性为barManager1。
然后编辑popupMenu1 customerize 项
有很多子菜单添加
实现弹出在需要弹出右键菜单的onmouseup事件中
if (e.Button== System.Windows.Forms.MouseButtons.Right)
{
this.popupMenu1.ShowPopup(Control.MousePosition);
}
对于点击了子菜单
private void barSubItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
BarManager b1= sender as BarManager;
//XtraMessageBox.Show(b1.Categories.Manager.Items[0].Caption);
XtraMessageBox.Show(b1.Categories.Count.ToString());
}
可以用items[0]取出当前点击的值貌似
DevExporess 右键菜单的实现,布布扣,bubuko.com
DevExporess 右键菜单的实现
标签:style os for io div re
原文地址:http://www.cnblogs.com/caigen029/p/3837001.html