Close Button on VS11 Apps

心已入冬 提交于 2019-12-01 06:50:48

If you don't care about certification - e.g. you want a close button in your own debug build to help you with testing - you can call Application.Current.Exit()

You shouldn't close your app.

This is one of the concepts of Metro apps.The user switches to a different task and the Process Lifetime Management aspects kick in, first suspending your application and then later, if needed, terminating it. Don't close the application's window: let the user know that there is no information currently available and then let them switch away, close, or wait as they'd prefer.

Took from here

You must not implement Close Button.

If you do so, your app will be not able to sell in the store. See "Certification requirements for Windows apps".

3.6 Your app must use the mechanisms provided by the system for those features that have them
(snip)
Your app must neither programmatically close nor offer UI affordances to close it.

You want this? App.Current.Exit();

Vijay Chandak

Try this.. It worked

App.Current.Terminate();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!