1

我想做屏幕投影应用程序。根据 MSDN,我需要 Package.appxmanifest 中的 rescap 命名空间。我写了这个xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities",但没有出现命名空间。我需要更多的东西吗?

4

3 回答 3

1

在 Package.appxmanifest 添加 rescap 命名空间时,将“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">

已编辑:VS 告诉您“能力”不在“rescap”命名空间中,并且不允许您构建应用程序。将名称添加到 IgnorableNamespaces 让您可以使用“rescap”命名空间,而不会破坏应用程序并让您使用受限功能。

于 2015-11-30T05:07:20.203 回答
0

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

于 2016-11-05T18:54:28.400 回答
0

要添加“屏幕投影功能”,您可以在“package.manifest”中包含以下两行:

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

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

此外,您还可以找到使用 ProjectionManager 和 ApplicationViewSwitcher API的投影示例。

致 Cristian:我不认为他的问题与“IgnorableNamespaces”有关,这更多是关于向后能力。

于 2015-11-30T06:22:43.263 回答