是否有任何特定的方法可以将全局异常处理程序添加到 Metro 风格的应用程序中,就像 App.Xaml.cs 文件中的 WP7 中的 LittleWatson 一样?处理此问题的最佳做法和模式是什么?
最佳答案
UnhandledException event page解释为什么你的异常没有被处理(强调我的):
This event is only used with exceptions encountered by the XAML framework. Exceptions encountered by other Windows Runtime components or parts of the application that are not connected to the XAML framework will not result in this event being raised.
它继续解释说您应该在最具体的时间捕获异常。据我所知,Windows 8 风格的应用程序中没有全局事件处理程序这样的东西。
关于c# - 如何将全局异常处理程序添加到 Metro Style 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10751745/