protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); Application.Current.DispatcherUnhandledException += new DispatcherUnhandledExceptionEventHandler(Current_DispatcherUnhandledException); }