In Silverlight, how do I catch an XamlParseException exception -
i running silverlight 4 mvvm framework. time time, not always, during detail page load, xamlparseexception. since works 99% of time, i'm pretty sure xaml page fine.
is possible similar following in code behind page?
public detailview() { try { initializecomponent(); } catch (xamlparseexception e) { debugger.break(); } }
in other words, how catch xamlparseexception?
you cannot catch exception using try-catch when parsing being handled runtime.
the way catch exception when using xamlreader in discussion:
http://social.msdn.microsoft.com/forums/da-dk/wpf/thread/02679567-1bd3-41d1-bfd1-326f646d95d1you can try handling on application_unhandledexception.
more info here: http://msdn.microsoft.com/en-us/library/system.windows.application.unhandledexception(v=vs.95).aspxand more info here: http://msdn.microsoft.com/en-us/library/cc189070(v=vs.95).aspx
Comments
Post a Comment