예제 #1
0
        public static System.Windows.Window mainWindow(this API_VisualStudio_2010_WPF visualStudio)
        {
            var vsAddin = visualStudio.VsAddIn;
            var impl    = vsAddin.VS_Dte.MainWindow.field("_impl");
            var window  = (System.Windows.Window)impl.prop("Window");

            return(window);
        }
예제 #2
0
        public static MainSite mainSite(this API_VisualStudio_2010_WPF visualStudio)
        {
            var window         = visualStudio.mainWindow();
            var contentControl = (ContentControl)window.controls_Wpf().second();

            return((MainSite)contentControl.wpfInvoke(
                       () => {
                return contentControl.Content;                                 //returns Microsoft.VisualStudio.PlatformUI.Shell.MainSite
            }));
        }