[英]How to show the window “Add connection” from the extension for Visual Studio?
[英]How can I add a button to a window for a Visual Studio Extension?
我正在尝试创建Visual Studio扩展,并且需要向特定窗口添加按钮。 在哪里可以找到该屏幕后面的“源代码”以进行添加?
我尝试通过不同的示例进行解析并浏览文档。
<Button guid="guidSWO"
id="EnableDisableguidSWO" priority="0x0100" type="Button">
<Parent guid="guidSWO" id="MyMenuGroup" />
<Icon guid="guidImages" id="bmpPic1" />
<Strings>
<ButtonText>Enable/Disable SWO</ButtonText>
</Strings>
</Button>
此代码段显示菜单中的按钮,但我想在快速监视菜单中显示按钮
好主意,但我担心暂时不支持这种行为。
有关扩展ToolWindow主题的相关文档:
要在菜单中显示按钮,您可以通过创建custom command template
轻松地做到这一点。 现在,您想要扩展的是ToolWindow,可以检查上面的文档,您会发现可以扩展Output Window
, Properties Window
等,但是不支持其他窗口,例如Quick Watch Window
和Diagnostic Tools Window
。
据我所知,我们无法通过在其中添加新按钮来扩展“ Quick Watch Window
。 “ Quick Watch Window
与“ Solution Explorer
或“ Output Window
。 我认为Output window
使用TableControl or TableView or ListView or what
将其作为UI窗口的一部分,因此,由于VS SDK提供了一些相关的API(如IVsOutputWindow) ,因此扩展它很容易。 但是对于“ Quick Watch window
, VS SDK中没有此类API可以扩展其UI。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.