加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – 如何将全局异常处理程序添加到Metro风格应用程序?

发布时间:2020-12-15 04:31:56 所属栏目:百科 来源:网络整理
导读:是否有任何特定方法可以将全局异常处理程序添加到Metro风格应用程序,就像App.Xaml.cs文件中的WP7中的LittleWatson一样?处理这个问题的最佳实践和模式是什么? 解决方法 UnhandledException event page解释了为什么你的例外没有被处理(强调我的): This even
是否有任何特定方法可以将全局异常处理程序添加到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风格的应用程序中没有全局事件处理程序.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读