tags:

views:

33

answers:

2

When I do something illegal in XAML, e.g. binding to a non-existing source all exceptions are silently handled and logged to the output console. I like to have these in a log file, in case this happens when this occurs when my application runs at the customer.

How can I do this?

A: 

This article talks about how to set up the trace sources for WPF so that a filtered set of the bindings messages can be output to a text file.

Martin Harris
A: 

I suggest using a DispatchUnhandledExceptionEventHandler for the entire application to catch errors in your application

There is a tutorial here: Exception handling made easy in XAML Applications

jitter