关于DevComponents.DotNetBar.sidebarpanelitem这个控件 绑定菜单事件的问题
private void InitMenu() {
DevComponents.DotNetBar.BaseItem[] baseitem = new DevComponents.DotNetBar.BaseItem[menuStrip1.Items.Count];
System.Windows.Forms.ToolStripMenuItem submenuitem = new System.Windows.Forms.ToolStripMenuItem();
for (int ii = 0; ii < menuStrip1.Items.Count; ii++)
{
baseitem[ii] = new DevComponents.DotNetBar.SideBarPanelItem();
baseitem[ii].Name = menuStrip1.Items[ii].Name.ToString();
baseitem[ii].Text = menuStrip1.Items[ii].Text.ToString();
submenuitem = (ToolStripMenuItem)menuStrip1.Items[ii];
DevComponents.DotNetBar.ButtonItem[] buttonitem = new DevComponents.DotNetBar.ButtonItem[submenuitem.DropDownItems.Count];
for (int i = 0; i < submenuitem.DropDownItems.Count; i++)
{
if (submenuitem.DropDownItems[i].Text == "" ¦ ¦ submenuitem.DropDownItems[i].Text.Trim() == "-") { continue; }
DevComponents.DotNetBar.ButtonItem blnitem = new DevComponents.DotNetBar.ButtonItem(submenuitem.DropDownItems[i].Name, submenuitem.DropDownItems[i].Text);//这里取得菜单的名及对应的TEXT
blnitem.Click += new System.EventHandler//在这里想绑定相对应的菜单事件不知道怎写了
blnitem.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.TextOnlyAlways;
blnitem.ImagePaddingHorizontal = 8;
blnitem.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
baseitem[ii].SubItems.Add(blnitem);
}
sideBar1.Panels.Add(baseitem[ii]);
sideBar1.Refresh();
}
}