Esempio n. 1
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();
        }
Esempio n. 2
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();
        }
Esempio n. 3
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();
 }
Esempio n. 4
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();
        }
Esempio n. 5
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();
        }
Esempio n. 6
0
 public static void ShowError(this Exception ex)
 {
     ErrorWindow error = new ErrorWindow(ex);
     error.Show();
 }
Esempio n. 7
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();
 }
Esempio n. 8
0
        public static void ShowError(this Exception ex)
        {
            ErrorWindow error = new ErrorWindow(ex);

            error.Show();
        }