private void App_OnStartup(object sender, StartupEventArgs e) { var viewModel = new HomeViewModel(); var window = new HomeWindow { DataContext = viewModel }; window.Show(); }
private void App_OnStartup(object sender, StartupEventArgs e) { var window = new HomeWindow(); var viewModel = new HomeViewModel(); window.DataContext = viewModel; window.Show(); Application.Current.DispatcherUnhandledException += new DispatcherUnhandledExceptionEventHandler(AppDispatcherUnhandledException); if (HasRun() == false) { FirstRun(); } }