Show the window after it's added to the main.
This way the viewModel is inherited correctly.