地铁应用程序不能再编程被杀?被杀、能再、应用程序、地铁

2023-09-03 10:38:51 作者:卑微的戏子。

我是新来赢得8 Metro应用开发,并发现很多事情似乎是从经典的WPF改变。

I'm new to Win 8 Metro application development, and discovered that lots of things seem to be changed from the classic WPF.

什么烦恼我最深的是,有没有办法关闭应用程序。这是非常恼人的,当涉及到调试应用程序。所以我在寻找方法来在我的应用程序添加一个关闭按钮。

What troubles me the most is that there's no way to close the app. This is extremely annoying when it comes to debugging the app. Therefore I'm looking at ways to add a "close" button in my app.

然而,旧的WPF方式:

However, the old WPF way of:

Application.Current.Shutdown()

不再存在。我找不到进程 System.Diagnostics程序了。

有谁知道如何做到这一点?

Does anyone know how to do this?

推荐答案

您正在寻找 App.Current.Exit()