Windows Phone 7 关闭应用程序

编程入门 行业动态 更新时间:2024-10-28 02:33:45
本文介绍了Windows Phone 7 关闭应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

是否有可能以编程方式关闭 Windows Phone 7 上的 Silverlight 应用程序?

Is there any possibility to programatically close Silverlight application on Windows Phone 7?

推荐答案

如果您编写 XNA 游戏,您将可以访问显式的 Exit() 方法.如果您正在编写传统的 Silverlight 项目,那么,没有办法以编程方式关闭您的应用程序.另请参阅 Peter Torr 的在 Windows Phone 7 中退出 Silverlight 应用程序的博客条目.在那里,他还提到了抛出未处理异常的选项,IMO 是一种糟糕的编程风格.

If you write an XNA Game, you will have access to an explicit Exit() method. If you are writing traditional Silverlight project, then NO, there is no way to programatically close your app. See also Peter Torr's Blog entry on Exiting Silverlight Apps in Windows Phone 7. There he also mentions the option of throwing an unhandled exception, which IMO is a terrible programing style.

您可以尝试的一个选项是使用 WP7 导航服务以编程方式导航回应用程序之外.不知道这是否会奏效.为什么你需要退出?

An option you may try, is using the WP7 Navigation Service to programatically navigate back out of the application. Not sure if that would work though. Why do you need to Exit?

这篇关于Windows Phone 7 关闭应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-25 15:45:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1119283.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   Windows   Phone

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!