예제 #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();
        }
예제 #2
0
파일: App.xaml.cs 프로젝트: yhhno/Adhesive
 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();
 }
예제 #3
0
 public static void ShowError(this Exception ex)
 {
     ErrorWindow error = new ErrorWindow(ex);
     error.Show();
 }
예제 #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();
 }
예제 #5
0
        public static void ShowError(this Exception ex)
        {
            ErrorWindow error = new ErrorWindow(ex);

            error.Show();
        }