用于 Windows 8 开发的 Metro 与 WPF?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13139761/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Metro vs WPF for Windows 8 development?
提问by theqs1000
I'm trying to get my head around the future of development for Windows 8. My understanding is that developing Metro apps will mean they are strictly Windows 8 only.
我正在努力了解 Windows 8 开发的未来。我的理解是,开发 Metro 应用程序将意味着它们仅适用于 Windows 8。
But there are technologies out there, see How to build a Metro App in WPF, which means WPF could be used to make something have that Metro look and feel.
但是有一些技术,请参阅如何在 WPF 中构建 Metro 应用程序,这意味着 WPF 可用于制作具有 Metro 外观和感觉的东西。
So am I right in understanding that a WPF app could be developed - and run on Windows 7 - but also run on Windows 8? If only Metro apps can be run from the new Start screen in Windows 8, does that mean traditional style apps can still be run through the desktop mode?
那么我是否正确理解可以开发 WPF 应用程序 - 并在 Windows 7 上运行 - 但也可以在 Windows 8 上运行?如果在 Windows 8 中只能从新的“开始”屏幕运行 Metro 应用程序,这是否意味着仍然可以通过桌面模式运行传统风格的应用程序?
Thanks
谢谢
采纳答案by Joey
“Normal” Windows applications can still run fine in Desktop mode. In fact, if you have such an application it will likely just run the same as it does on Windows 7 and you don't really need to feel pressured to create a Windows Store app (formerly known as Metro).
“普通”Windows 应用程序在桌面模式下仍然可以正常运行。事实上,如果您有这样的应用程序,它很可能会像在 Windows 7 上一样运行,而且您真的不需要感到压力来创建 Windows 应用商店应用程序(以前称为 Metro)。
The question you linked to talks about something entirely else, though. It's for creating applications like Zune or the Github Windows client in WPF. They have a certain aesthetic that is Metro-like but they're not actually Windows Store apps. You cannot use WPF for creating the latter, although most key concepts are similar or identical.
不过,您所链接的问题完全是另外一回事。它用于在 WPF 中创建像 Zune 或 Github Windows 客户端这样的应用程序。它们具有某种类似于 Metro 的美感,但它们实际上并不是 Windows 应用商店应用程序。您不能使用 WPF 来创建后者,尽管大多数关键概念相似或相同。
回答by Daniel A. White
Metro is just the design language.
Metro只是设计语言。
A traditional WPF can run on Windows 7 and on the Windows 8 desktop. These can't be run on Windows RT devices.
传统的 WPF 可以在 Windows 7 和 Windows 8 桌面上运行。这些不能在 Windows RT 设备上运行。
Modern apps, i.e. Windows 8/RT apps or Windows Store apps can't be written with WPF and only run on Windows 8 and Windows RT.
现代应用程序,即 Windows 8/RT 应用程序或 Windows 应用商店应用程序不能用 WPF 编写,只能在 Windows 8 和 Windows RT 上运行。
回答by Aphelion
Metro is much more than a GUI. It is able to access the Windows Runtimeproviding common functionality like webcam access.
Metro 不仅仅是一个 GUI。它能够访问提供网络摄像头访问等常用功能的Windows 运行时。
However using WPF you can 'mock' the metro visual layer. But they will be traditional desktop applications that will run under desktop mode in windows 8.
但是,使用 WPF,您可以“模拟”地铁视觉层。但它们将是传统的桌面应用程序,将在 Windows 8 的桌面模式下运行。
I would suggest to develop 2 GUI layers (metro and desktop).
我建议开发 2 个 GUI 层(地铁和桌面)。

