barSubItem1.ClearLinks();//清空BarManager中指定的BarSubItem的子菜单
BarSubItem subItem_CE = new BarSubItem(barManager1, "二级菜单");
subItem_CE.ItemInMenuAppearance.Normal.Font = new Font("黑体", 11f);
subItem_CE.Size = new System.Drawing.Size(122,32);
barManager1.Items.Add(subItem_CE);
barSubItem1.ItemLinks.Add(subItem_CE);
foreach (var item in *List) //*List代指一个List,遍历List,添加三级菜单
{
BarButtonItem _buttonItem = new BarButtonItem(barManager1, item.uniqueName);
_buttonItem.ItemInMenuAppearance.Normal.Font = new Font("黑体", 11f);
_buttonItem.Tag = item.id;
_buttonItem.ItemClick += new ItemClickEventHandler(_buttonItem_Click); //绑定Click事件
barManager1.Items.Add(subItem_CE);
subItem_CE.ItemLinks.Add(_buttonItem);
}