private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) { if (!System.Diagnostics.Debugger.IsAttached) { e.Handled = true; return; ChildWindow errorWin = new ErrorWindow(e.ExceptionObject); errorWin.Show(); } }
private void ContentFrame_NavigationFailed(object sender, NavigationFailedEventArgs e) { e.Handled = true; ChildWindow errorWin = new ErrorWindow("页面加载错误", "系统发生未知错误,造成原因可能是网络故障或者服务器太过繁忙,请稍后再试!"); errorWin.Show(); }