简体   繁体   English

UWP应用程序的受限功能

[英]Restricted capabilities on UWP apps

I want to make screen projection application. 我要制作屏幕投影应用程序。 And according to MSDN I need a rescap namespace in Package.appxmanifest. 根据MSDN,我需要在Package.appxmanifest中使用一个rescap命名空间。 I Wrote this xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" , but namespace does not appears. 我写了这个xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" ,但是没有出现名称空间。 Do I need something more? 我还需要什么吗?

In the Package.appxmanifest when you add the rescap namespace, add 'rescap' to the IgnorableNamespaces property. 在添加rescap命名空间时,在Package.appxmanifest中,将'rescap'添加到IgnorableNamespaces属性。

<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" 
     xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" 
     xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" 
     xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
     IgnorableNamespaces="uap mp rescap">

Edited: VS tells you "Capability" aren't into "rescap" namespace and doesn't let you build the application. 编辑:VS告诉您“功能”没有进入“ rescap”命名空间,并且不允许您构建应用程序。 Adding the name to the IgnorableNamespaces let you use the "rescap" namespace without breaking the application and letting you use the restricted capability. 将名称添加到IgnorableNamespaces即可使用“ rescap”名称空间,而无需破坏应用程序并使用受限功能。

To Add "Screen Projection Capability", you can include following two lines in "package.manifest": 要添加“屏幕投影功能”,可以在“ package.manifest”中包括以下两行:

xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"

<Capabilities>
<rescap:Capability Name="screenDuplication "/>
</Capabilities>

Besides, you can find a projection sample , which use ProjectionManager and ApplicationViewSwitcher APIs. 此外,您还可以找到使用ProjectionManager和ApplicationViewSwitcher API的投影示例

To Cristian: I don't think his problem is related with "IgnorableNamespaces", which is more about backward capability. 致克里斯蒂安(Cristian):我认为他的问题与“ IgnorableNamespaces”无关,后者更多地与向后功能有关。

开发者帐户不能使用特殊功能和受限功能,因为该公司帐户有需要。

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

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