private void Application_Startup(object sender, StartupEventArgs e) { // define application exception handler Application.Current.DispatcherUnhandledException += new DispatcherUnhandledExceptionEventHandler(AppDispatcherUnhandledException); MigrateSettings(); RegisterServices(); }