EnvDTE.DTE dte = (EnvDTE.DTE)Package.GetGlobalService(typeof(EnvDTE.DTE)); CommandBars commandBars = (CommandBars)dte.CommandBars; CommandBar toolsMenu = commandBars["Tools"]; // Find the "Options" item in the "Tools" menu CommandBarControl optionsControl = null; foreach (CommandBarControl control in toolsMenu.Controls) { if (control.Caption == "&Options...") { optionsControl = control; break; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)