Windows phone 7 如何退出windows phone 7应用程序?

Windows phone 7 如何退出windows phone 7应用程序?,windows-phone-7,Windows Phone 7,可能的重复项: 大家好, 有没有办法退出WindowsPhone7中的应用程序。我的EULA.xaml和MainPage.xaml问题已经解决,但在这两种情况下都必须退出MainPage.xaml上的应用程序。 提前感谢。在WP7 Silverlight中没有标准API来实现这一点。诀窍是,你可以抛出一个未处理的异常,这可能会导致应用程序中断并转到WindowsPhone的“开始”菜单 public class ExitException :Exception {} 把这个扔到你想放弃的

可能的重复项:


大家好, 有没有办法退出WindowsPhone7中的应用程序。我的EULA.xaml和MainPage.xaml问题已经解决,但在这两种情况下都必须退出MainPage.xaml上的应用程序。
提前感谢。

在WP7 Silverlight中没有标准API来实现这一点。诀窍是,你可以抛出一个未处理的异常,这可能会导致应用程序中断并转到WindowsPhone的“开始”菜单

public class ExitException :Exception {}
把这个扔到你想放弃的地方

throw new ExitException();

不幸的是,由于Microsoft测试未处理的异常(),这将无法通过认证。我想我们现在已经有足够的问题了。。。可能的副本请阅读以下内容: