Index: Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs =================================================================== diff -u -re63a6c37c6df68f5af5f7bb02b2affc6876e4bee -r229c2919ec8ea593f593b614ca64d4c42a5b8534 --- Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision e63a6c37c6df68f5af5f7bb02b2affc6876e4bee) +++ Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 229c2919ec8ea593f593b614ca64d4c42a5b8534) @@ -58,6 +58,7 @@ private PropertyGridView.PropertyGridView propertyGrid; private IGui gui; + private ProjectExplorer.ProjectExplorer projectExplorer; /// /// Initializes a new instance of the class. @@ -159,6 +160,8 @@ } } + public ProjectExplorer.ProjectExplorer ProjectExplorer => projectExplorer; + /// /// Sets the and dependencies. /// Index: Core/Common/src/Core.Common.Gui/GuiCore.cs =================================================================== diff -u -r2cef18fa35c5e50f0e08b5681f07d15208b21815 -r229c2919ec8ea593f593b614ca64d4c42a5b8534 --- Core/Common/src/Core.Common.Gui/GuiCore.cs (.../GuiCore.cs) (revision 2cef18fa35c5e50f0e08b5681f07d15208b21815) +++ Core/Common/src/Core.Common.Gui/GuiCore.cs (.../GuiCore.cs) (revision 229c2919ec8ea593f593b614ca64d4c42a5b8534) @@ -337,14 +337,6 @@ isAlreadyRunningInstanceOfIGui = false; } - private IProjectExplorer ProjectExplorer - { - get - { - return ViewHost.ToolViews.OfType().FirstOrDefault(); - } - } - private void InitializeProjectFromPath(string projectPath) { bool isPathGiven = !string.IsNullOrWhiteSpace(projectPath); @@ -455,9 +447,9 @@ ViewHost.BringToFront(mainWindow.MessageWindow); } - if (ViewHost.ToolViews.Contains(ProjectExplorer)) + if (ViewHost.ToolViews.Contains(mainWindow.ProjectExplorer)) { - ViewHost.BringToFront(ProjectExplorer); + ViewHost.BringToFront(mainWindow.ProjectExplorer); } mainWindow.ValidateItems(); Index: Core/Common/test/Core.Common.Gui.Test/Forms/MainWindow/MainWindowTest.cs =================================================================== diff -u -r96ad87bd94cb0134dbd4fd957da808e680135730 -r229c2919ec8ea593f593b614ca64d4c42a5b8534 --- Core/Common/test/Core.Common.Gui.Test/Forms/MainWindow/MainWindowTest.cs (.../MainWindowTest.cs) (revision 96ad87bd94cb0134dbd4fd957da808e680135730) +++ Core/Common/test/Core.Common.Gui.Test/Forms/MainWindow/MainWindowTest.cs (.../MainWindowTest.cs) (revision 229c2919ec8ea593f593b614ca64d4c42a5b8534) @@ -74,6 +74,7 @@ Assert.IsNull(mainWindow.MessageWindow); Assert.IsNull(mainWindow.PropertyGrid); + Assert.IsNull(mainWindow.ProjectExplorer); Assert.IsNotNull(mainWindow.Handle); Assert.IsFalse(mainWindow.InvokeRequired,