I'm using the Visual Studio API and creating a VS addon. VS 2012 introduced the Preview Tab option. My addon opens several files, and if the user has the Preview Tab option enabled it opens them in the preview tab. The problem is that each file that is opened replaces the previously opened file in the preview tab. So is there a way that I can check if the active window is the Preview Tab, and mark the window as Keep Open before opening the next file (shows up as Window.KeepTabOpen in the keyboard shortcuts)?
I know I can get access to the currently active window using:
var dte2 = Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(DTE)) as DTE2; dte2.ActiveWindow
but I can't find a property/method for checking if it is in the Preview Tab, or changing it to Keep Open.
Any help is appreciated. Thanks.
- Dan - "Can't never could do anything"