In addition what others mentioned here, note that combining the Application.DispatcherUnhandledException
(and its similars) with
<configuration>
<runtime>
<legacyUnhandledExceptionPolicy enabled="1" />
</runtime>
</configuration>
in the app.config
will prevent your secondary threads exception from shutting down the application.