简体   繁体   English

Extension Manager在Visual Studio 2015中仅调用一次加载事件

[英]Extension Manager calls load events only once in Visual Studio 2015

I want to hook up to any kind of event triggered before the Extension Manager is loaded (Loaded, Activated, etc.), using Handlers to execute methods I wrote. 我想使用扩展程序加载我使用编写的方法来加载扩展管理器之前触发的任何类型的事件(已加载,已激活等)。

I tried all of them, and they get executed when the Extension Manager is rendered the first time. 我尝试了所有这些方法,并在首次呈现扩展管理器时执行了它们。 However, if I close it and open it again, the events are not triggered. 但是,如果我关闭它并再次打开它,则不会触发事件。

Is this common behavior in VS2015 (unlike in previous versions)? 这是VS2015中的常见行为吗(与以前的版本不同)? Is there any workaround to solve this? 是否有解决方法?

OK, I figured it out. 好,我知道了。

Until VS2015, the Extension Manager shared the same Window, but this newer version uses a different window every time the Extension Manager is opened. 在VS2015之前,扩展管理器共享相同的窗口,但是每次打开扩展管理器时,此较新版本都使用不同的窗口。 This is why a re-setup of the window event handlers is needed in order to get the events triggered. 这就是为什么需要重新设置窗口事件处理程序才能触发事件的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM