I'm writing an add-in in Visual Studio 2010 Beta 2, C#, .NET 4.0. I am trying to hide all but a few windows in the IDE, in a specific situation. I have created a new WindowConfiguration, and Apply()'d it, and I'm then trying to enumerate all the windows and .Close() them.
I have tried enumerating using the DTE2.Windows collection, as well as the IEnumWindowFrames method, but there only seems to ever be these windows by default: Start Page, Solution Explorer, Class View, Object Browser, Find and Replace.
The Server Explorer is part of a tab that is hidden by default. If I activate that tab, then the Server Explorer is included in the Windows collection. It seems VS is loading windows on demand, which is nice, but it leaves me with a problem. I want to be able to hide the tabs that represent windows, whether the window has been loaded or not.
Is there a way to enumerate all the windows in the IDE that are either visible or may be hiding with a tab , or is there a way to access the tabs and hide them?
Thanks