Skip to content

Some tool windows are broken if using VS.Events.WindowEvents.ActiveFrameChanged #455

@lordfanger

Description

@lordfanger

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 for WindowFrame(IVsWindowFrame frame) and these in turn calls SetProperty(-3011, this) later invoking NotifyPropertyChanged("ViewHelper") in original WindowFrame 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.

VS.Events.WindowEvents.FrameIsVisibleChanged += args =>
{
    _ = new WindowFrame(args.Frame);
}

Is it possible to not create new instances and reuse the old ones when they are already WindowFrame?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions