簡體   English   中英

UWP應用程序的受限功能

[英]Restricted capabilities on UWP apps

我要制作屏幕投影應用程序。 根據MSDN,我需要在Package.appxmanifest中使用一個rescap命名空間。 我寫了這個xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" ,但是沒有出現名稱空間。 我還需要什么嗎?

在添加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">

編輯:VS告訴您“功能”沒有進入“ rescap”命名空間,並且不允許您構建應用程序。 將名稱添加到IgnorableNamespaces即可使用“ rescap”名稱空間,而無需破壞應用程序並使用受限功能。

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

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

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

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

致克里斯蒂安(Cristian):我認為他的問題與“ IgnorableNamespaces”無關,后者更多地與向后功能有關。

開發者帳戶不能使用特殊功能和受限功能,因為該公司帳戶有需要。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM