Catching XAML Exceptions

If you have worked with XAML, you may have noticed that the exception handling is, well, non-existent.  This is painful during the experience of building your application, although as I mentioned in a previous post, EID has some nice support for helping you understand why your XAML is unhappy at design-time.

The question that has been raised by a few folks is how to catch XAML exceptions at runtime in your application. There are two events you can listen for:



Both of these can be wired up so that you can swallow any ugliness that you might not get in your own try/catch blocks.

Comments (3)
  1. Erno says:


    Please let me/us know what you think of my suggestion:


  2. Currently, I am struggling with WinFX and I must admit that I do not like the way how WPF (Windows Presentation…

Comments are closed.

Skip to main content