1 回答

TA貢獻1993條經驗 獲得超6個贊
只需右鍵單擊解決方案資源管理器中的文件 > 打開方式。然后簡單地配置它:
Visual Studio 是最好的 IDE 之一,如果不是最好的,不確定您為什么要使用寫字板,但至少這將使您免于制作擴展。
如果您確實想這樣做,這里有一個示例,說明如何將菜單項添加到上下文菜單中,它會為您提供 google 的關鍵字:
Microsoft.VisualStudio.CommandBars.CommandBar menuBarCommandBar = ((Microsoft.VisualStudio.CommandBars.CommandBars)_applicationObject.CommandBars)["MenuBar"];
CommandBarControl toolsControl = menuBarCommandBar.Controls[toolsMenuName];
CommandBarPopup toolsPopup = (CommandBarPopup)toolsControl;
Command command = commands.AddNamedCommand2(_addInInstance, "AddinMultiLineWatch", "AddinMultiLineWatch", "Executes the command for AddinMultiLineWatch", true, 59, ref contextGUIDS, (int)vsCommandStatus.vsCommandStatusSupported+(int)vsCommandStatus.vsCommandStatusEnabled, (int)vsCommandStyle.vsCommandStylePictAndText, vsCommandControlType.vsCommandControlTypeButton);
if((command != null) && (toolsPopup != null))
{
command.AddControl(toolsPopup.CommandBar, 1);
}
- 1 回答
- 0 關注
- 144 瀏覽
添加回答
舉報