If anyone is interested, I found an eventthat is fired for unhandled exceptions, that you can hook into from a UserControl:
| this.Dispatcher.UnhandledException+=new |
| System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(Dispatcher_UnhandledException); |
I then threw a custom app exception from Dispatcher_UnhandledException.
Then from my hosting winforms application I was able to catch the custom app exception like so:
| DimdomainAsAppDomain=AppDomain.CurrentDomain |
|
| AddHandlerdomain.UnhandledException,AddressOfMyUnhandledException |
Cheers
Jamie