Click here to Skip to main content
15,887,267 members
Home / Discussions / WPF
   

WPF

 
Questioni want make Online examination system so which module we used help me .and it work flow of the system Pin
Member 1178790023-Jun-15 18:38
Member 1178790023-Jun-15 18:38 
AnswerRe: i want make Online examination system so which module we used help me .and it work flow of the system Pin
Mycroft Holmes23-Jun-15 20:07
professionalMycroft Holmes23-Jun-15 20:07 
QuestionWPF Expander ExpandDirection Problem Pin
Kevin Marois22-Jun-15 12:56
professionalKevin Marois22-Jun-15 12:56 
AnswerRe: WPF Expander ExpandDirection Problem Pin
Pete O'Hanlon22-Jun-15 19:03
mvePete O'Hanlon22-Jun-15 19:03 
GeneralRe: WPF Expander ExpandDirection Problem Pin
Kevin Marois23-Jun-15 4:21
professionalKevin Marois23-Jun-15 4:21 
GeneralRe: WPF Expander ExpandDirection Problem Pin
Kevin Marois23-Jun-15 5:01
professionalKevin Marois23-Jun-15 5:01 
AnswerRe: WPF Expander ExpandDirection Problem Pin
maddymaddy1428-Jun-15 21:16
maddymaddy1428-Jun-15 21:16 
QuestionGlobal Exception Handling Pin
Kevin Marois19-Jun-15 12:24
professionalKevin Marois19-Jun-15 12:24 
I have to following in my App.xaml code behind:
public partial class App : Application
{
    public App()
    {
    }

    private void Application_Startup(object sender, StartupEventArgs e)
    {
        Application.Current.DispatcherUnhandledException += dispatchUnhandled;
        AppDomain.CurrentDomain.UnhandledException += applicationUnhandledException;
    }

    private void dispatchUnhandled(object sender, DispatcherUnhandledExceptionEventArgs e)
    {
        var errorMessage = getInnerException(e.Exception);

        displayErrorMessage(errorMessage, e.Exception);
        e.Handled = true;
    }

    private static void applicationUnhandledException(object sender, UnhandledExceptionEventArgs e)
    {
        var ex = e.ExceptionObject as Exception;
        var errorMessage = getInnerException(ex);

        displayErrorMessage(errorMessage, ex);
    }

    private static void displayErrorMessage(string errorMessage, Exception ex)
    {
        logException(errorMessage, ex);

        ErrorHandlerViewModel vm = new ErrorHandlerViewModel();
        vm.ErrorMessage = errorMessage;
        vm.ErrorText = ex.ToString();

        ErrorHandlerView view = new ErrorHandlerView();
        view.DataContext = vm;
        view.ShowDialog();

        Application.Current.Shutdown();
    }

    private static string getInnerException(Exception e)
    {
        string msg = e.InnerException == null ? e.Message : getInnerException(e.InnerException);
        return msg;
    }

    private static void logException(string errorMessage, Exception ex)
    {
        Logger.LogMessage(errorMessage);
        Logger.LogMessage(ex.ToString());
    }
}

Application_Startup DOES run, but no exceptions are caught. What's wrong here?

Thanks
If it's not broken, fix it until it is

QuestionRe: Global Exception Handling Pin
Richard Deeming22-Jun-15 1:23
mveRichard Deeming22-Jun-15 1:23 
AnswerRe: Global Exception Handling Pin
Kevin Marois22-Jun-15 3:50
professionalKevin Marois22-Jun-15 3:50 
GeneralRe: Global Exception Handling Pin
Richard Deeming22-Jun-15 3:55
mveRichard Deeming22-Jun-15 3:55 
GeneralRe: Global Exception Handling Pin
Kevin Marois22-Jun-15 3:56
professionalKevin Marois22-Jun-15 3:56 
AnswerRe: Global Exception Handling Pin
maddymaddy1428-Jun-15 23:39
maddymaddy1428-Jun-15 23:39 
QuestionWPF Register Controls Pin
Kevin Marois19-Jun-15 5:15
professionalKevin Marois19-Jun-15 5:15 
QuestionDual Range Slider Control Pin
Kevin Marois19-Jun-15 4:50
professionalKevin Marois19-Jun-15 4:50 
QuestionDual Thumb Slider Pin
Kevin Marois17-Jun-15 13:10
professionalKevin Marois17-Jun-15 13:10 
QuestionCalculate ListBoxItem Height Pin
Kevin Marois17-Jun-15 6:43
professionalKevin Marois17-Jun-15 6:43 
AnswerRe: Calculate ListBoxItem Height Pin
Richard Deeming17-Jun-15 7:54
mveRichard Deeming17-Jun-15 7:54 
GeneralRe: Calculate ListBoxItem Height Pin
Kevin Marois17-Jun-15 8:07
professionalKevin Marois17-Jun-15 8:07 
QuestionFIPS Error Pin
#realJSOP11-Jun-15 3:41
mve#realJSOP11-Jun-15 3:41 
AnswerRe: FIPS Error Pin
Richard Deeming11-Jun-15 4:24
mveRichard Deeming11-Jun-15 4:24 
GeneralRe: FIPS Error Pin
#realJSOP11-Jun-15 4:42
mve#realJSOP11-Jun-15 4:42 
QuestionHow to get Data from web-server to Silverlight-App Pin
Frygreen10-Jun-15 10:31
Frygreen10-Jun-15 10:31 
AnswerRe: How to get Data from web-server to Silverlight-App Pin
Mycroft Holmes10-Jun-15 13:05
professionalMycroft Holmes10-Jun-15 13:05 
QuestionThoughts On Building My Own Framework Pin
Kevin Marois10-Jun-15 4:42
professionalKevin Marois10-Jun-15 4:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.