protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); ApplicationViewModel viewModel = App.appVM = new ApplicationViewModel(); ApplicationView view = new ApplicationView { DataContext = viewModel }; view.ShowDialog(); }