我拒绝我的应用程序时的例外情况 [英] Exception when I deactive my App

查看:55
本文介绍了我拒绝我的应用程序时的例外情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,但我发现了一个问题。

I'm developing an app, but I've found a problem.

当我按下Windows按钮以取消激活应用程序时,应用程序崩溃。

When I push the windows button to deactive the app, the app crash.

按下按钮时我的应用程序执行的操作包括:

The operations that my app do when I push the button are these:

 protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
        {

            
            PhoneApplicationService.Current.State["StatoUI"] = StatoUI;
            PhoneApplicationService.Current.State["OldStatoUI"] = OldStatoUI;
            PhoneApplicationService.Current.State["OldDialValue"] = OldDialValue;
            PhoneApplicationService.Current.State["DialValue"] = MyDial.Value;
            PhoneApplicationService.Current.State["InRegolazione"] = InRegolazione;  
            PhoneApplicationService.Current.State["LastPlayed"] = lastPlayed;
            PhoneApplicationService.Current.State["Ainput"] = Ainput;
            PhoneApplicationService.Current.State["Emaker"] = Emaker;
           
       

            base.OnNavigatedFrom(e);
        }

所有存储的类都是公开的。

All stored classes are public.

我没有在Application_Deactivated()中编码。

I've not code in Application_Deactivated().

应用程序因此异常消息而崩溃:

The app crash with this exception message:

推荐答案

您的应用程序是否以调试模式编译而不是发布?
Is your app compiled in debug mode instead of release?


这篇关于我拒绝我的应用程序时的例外情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆