简体   繁体   English

Metro应用程序可以了解其他应用程序吗?

[英]Can a Metro application be aware of other apps?

Is there any way of listing all the running metro applications from a metro app? 有没有办法列出地铁应用程序中所有正在运行的城域应用程序? I'm thinking about a metro Task Manager. 我正在考虑一个地铁任务经理。

Metro applications' awareness of each other is limited to the Sharing contracts available through the Share charm. Metro应用程序对彼此的了解仅限于通过Share charm提供的共享合同。 Doing something like a Task Manager would require using something like a dashboard approach with the data pulled from a service running on the Desktop side, which would probably be impractical. 像“任务管理器”这样的操作需要使用仪表板方法,从桌面端运行的服务中提取数据,这可能是不切实际的。

I don't think so. 我不这么认为。 Metro Apps run in a sandbox, like in Windows Phone. Metro Apps在沙盒中运行,就像在Windows Phone中一样。

The solid answer is no. 可靠的答案是否定的。 Metro applications cannot enumerate other Metro applications on the same system. Metro应用程序无法枚举同一系统上的其他Metro应用程序。 At the same Metro applications cannot be "aware" (as you put it) of desktop apps, and neither can desktop apps be (technically) aware of Metro apps. 在同一个Metro应用程序无法“意识到”(如你所说)桌面应用程序,桌面应用程序也不能(技术上)了解Metro应用程序。

But there is a case where this is not true. 但有一种情况并非如此。 The LoopBack function of Metro apps is disabled when they are delivered through the Microsoft store. Metro应用程序的LoopBack功能在通过Microsoft商店提供时会被禁用。 However, when they are side loaded or loaded through an enterprise portal, LoopBack may be enabled - this allows Metro apps to communicate back to the same box, effectively with a desktop application that might be listening. 但是,当他们通过企业门户进行侧面加载或加载时,可以启用LoopBack - 这允许Metro应用程序与可能正在侦听的桌面应用程序有效地通信回到同一个盒子。

You cannot loop through other Metro apps. 您无法遍历其他Metro应用。 You can, however, use contracts to share information between Metro style apps. 但是,您可以使用合同在Metro风格应用之间共享信息。 As Jerry Nixon mentioned in another answer, you can do it for sideloaded apps. 正如Jerry Nixon在另一个答案中提到的,你可以为侧载应用程序做到这一点。 Desktop apps are different and behave differently. 桌面应用程序不同,行为也不同。 You can access running desktop (not metro) apps 您可以访问正在运行的桌面(而不是地铁)应用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM