Example #1
0
        public static void ShowError(this Exception ex)
        {
            ErrorWindow c = new ErrorWindow(ex);

            var root = Application.Current.RootVisual as FrameworkElement;
            c.Width = root.ActualWidth * 0.98;
            c.Height = root.ActualHeight * 0.98;
            c.HorizontalAlignment = HorizontalAlignment.Center;
            c.VerticalAlignment = VerticalAlignment.Center;
            c.Show();
        }
Example #2
0
 private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
 {
     e.Handled = true;
     ChildWindow errorWin = new ErrorWindow(e.ExceptionObject);
     var root = Application.Current.RootVisual as FrameworkElement;
     errorWin.Width = root.ActualWidth * 0.95;
     errorWin.Height = root.ActualHeight * 0.95;
     errorWin.HorizontalAlignment = HorizontalAlignment.Center;
     errorWin.VerticalAlignment = VerticalAlignment.Center;
     errorWin.Show();
 }
Example #3
0
 public static void ShowError(this Exception ex)
 {
     ErrorWindow error = new ErrorWindow(ex);
     error.Show();
 }
Example #4
0
 // If an error occurs during navigation, show an error window
 private void ContentFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     e.Handled = true;
     ChildWindow errorWin = new ErrorWindow(e.Uri);
     errorWin.Show();
 }
Example #5
0
        public static void ShowError(this Exception ex)
        {
            ErrorWindow error = new ErrorWindow(ex);

            error.Show();
        }