答案 0 :(得分:6)
在同一个事件处理程序中,您也可以删除项目,例如:
private void zedGraphControl1_ContextMenuBuilder(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState)
{
foreach (ToolStripMenuItem item in menuStrip.Items)
{
if ((string)item.Tag == "set_default")
{
menuStrip.Items.Remove(item);
break;
}
}
}
相关链接:http://goorman.free.fr/ZedGraph/zedgraph.org/wiki/index43d0.html?title=Edit_the_Context_Menu