private void StartViewportAndWaitUntilWindowIsClosed() { Closing += (sender, args) => window.Dispose(); app = new BlockingViewportApp(window); viewport = new EditorViewport(window); viewModel.Service.Viewport = viewport; InitializeViewportAndContentManager(); Show(); app.RunAndBlock(); }