private void App_UnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e) { e.Handled = true; unhandledExParam exParam = new unhandledExParam(); exParam.exception = e.Exception; (Window.Current.Content as Frame).Navigate(typeof(UnhandledExceptionPage), exParam); }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); var param = (unhandledExParam)e.Parameter; if (param.hasCustomMessage == true) { titleText.Text = param.customTitle; subtitleText.Text = param.customSubtitle; } else { subtitleText.Text = param.ErrorMessage; } unhandledEx = param; }