通用 Windows 平台是否会替代 Windows 8 和 Windows Phone 应用程序的 WinRT? [英] Is Universal Windows Platform the replacement of WinRT of Windows 8 and Windows Phone apps?

查看:23
本文介绍了通用 Windows 平台是否会替代 Windows 8 和 Windows Phone 应用程序的 WinRT?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通用 Windows 平台是否会替代 Windows 8 和 Windows Phone 应用程序的 WinRT?我的意思是,有一个专门为 Windows 8 开发 Metro 应用程序的 WinRT 平台.现在,它被 UWP 取代了,不是吗?

Is Universal Windows Platform the replacement of WinRT of Windows 8 and Windows Phone apps? I mean, there was a WinRT platform to develop metro apps exclusively for Windows 8. Now, that is replaced by UWP, isn't it?

推荐答案

没错,UWP 是面向未来所有 Windows 设备 (Win 10+) 的新平台.然而,WinRT 并没有被 UWP 取代,而是在它之上的一个扩展,使 UWP 成为一个更广泛的 API 集,可以在更多设备上使用.正如微软自己所说:

That is correct, UWP is the new platform for ALL Windows devices going forward (Win 10+). However WinRT is not replaced by UWP but is instead an extension on top of it, making UWP a much broader set of APIs that can be used across even more devices. As Microsoft themselves state:

随着这种演变,面向 UWP 的应用不仅可以调用所有设备通用的 WinRT API,还可以调用特定于运行应用的设备系列的 API(包括 Win32 和 .NET API).

With this evolution, apps that target the UWP can call not only the WinRT APIs that are common to all devices, but also APIs (including Win32 and .NET APIs) that are specific to the device family the app is running on.

UWP 平台支持通用设备系列"类 API,然后所有 Windows 平台(Xbox、手机、桌面等)都支持这些 API.您可以使用一些扩展系列来限制应用的覆盖范围,例如移动设备系列".

The UWP platform supports the "Universal Device Family" class of APIs which is then supported on ALL windows platforms (Xbox, Phone, Desktop etc). There are some extension families that you can use that will limit the apps reach, such as a "Mobile Device Family".

但是,可以在运行时正常检查和使用这些特定的设备系列 API.例如,您可以在手机上使用 GPS 显示自己的位置,但不能在 Xbox 上启用该功能.

These specific device family APIs can however be checked for and used at runtime gracefully. For example you could show your own position using GPS on a phone, but not enable that functionality on a Xbox.

我希望这个回答对您有所帮助,如果您对此还有任何疑问,我建议您阅读这篇有关 UWP 平台的文章:

I hope this answer helps you, if you have any more questions about this I recommend reading this article about the UWP platform:

来源:https://msdn.microsoft.com/library/windows/应用程序/dn894631.aspx

祝您有美好的一天!

这篇关于通用 Windows 平台是否会替代 Windows 8 和 Windows Phone 应用程序的 WinRT?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆