[英]How can I programmatically refresh Visual Studio Solution Explorer?
How can I programmatically refresh Visual Studio Solution Explorer? 如何以编程方式刷新Visual Studio解决方案资源管理器?
I can get a hold of the solution explorer window object, but don't know what to do with it! 我可以握住解决方案资源管理器窗口对象,但不知道该怎么做!
var solutionExplorer = (UIHierarchy)DTE.Windows.Item(Constants.vsext_wk_SProjectWindow).Object();
Thanks. 谢谢。
Usually you can figure out these things by recording a temporary macro, doing what you want to do, and seeing what comes out in the macro editor. 通常,您可以通过记录一个临时宏,执行所需的操作以及查看宏编辑器中显示的内容来弄清楚这些事情。
Indeed, this is a case where it's probably only by recording a temporary macro that you can figure out how to do this. 确实,在这种情况下,可能只有记录临时宏,您才能弄清楚该怎么做。 Here's the command to refresh the Solution Explorer: 这是刷新解决方案资源管理器的命令:
DTE.Commands.Raise("{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}", 222, null, null)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.