-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some tool windows are broken if using VS.Events.WindowEvents.ActiveFrameChanged #455
Comments
Thanks for looking into this. What if it didn't new up a |
Wouldn't changing signature break all current usages? In current WindowFrame oldFrame = varValueOld as WindowFrame;
WindowFrame newFrame = varValueNew as WindowFrame;
NotifyWindowFrameEvent(delegate(uint cookie, IVsWindowFrameEvents events)
{
events.OnActiveFrameChanged(oldFrame, newFrame);
}); But with extension way. |
During investigating the issue in another repository, I've identified the problem there. (or can be somewhere deeper inside VS)
The constructor
ActiveFrameChangeEventArgs(IVsWindowFrame oldFrame, IVsWindowFrame newFrame)
calls constructors forWindowFrame(IVsWindowFrame frame)
and these in turn callsSetProperty(-3011, this)
later invokingNotifyPropertyChanged("ViewHelper")
in originalWindowFrame
possibly messing other things during Window initialization. My investigation ended here, I didn't went further.Anyway, I was able to reproduce the bug with calling
WindowFrame(IVsWindowFrame frame)
myself.Is it possible to not create new instances and reuse the old ones when they are already
WindowFrame
?The text was updated successfully, but these errors were encountered: