Winform menu 获取下拉菜单

来源:互联网 发布:mac chrome json 插件 编辑:程序博客网 时间:2024/06/06 13:15
 

                        for (int j = 0; j < this.menuStrip1.Items.Count; j++)
                        {
                            ToolStripDropDownItem menuitems = (ToolStripDropDownItem)menuStrip1.Items[j];

                            if (menuitems.DropDownItems.ContainsKey(Entity.Menu.Menus[i]))
                            {
                                menuitems.DropDownItems[Entity.Menu.Menus[i]].Visible = false;
                                break;
                            }

                        }