Share via


uap3:AppExtension

宣告 windows.appExtension類型的應用程式擴充點。 此元素指出應用程式想要取用和/或主機的延伸模組類別。

元素階層

<套件>

    <應用程式>

         <應用程式>

              <擴充功能>

                   <uap3:Extension>

                        <uap3:AppExtension>

Syntax

<uap3:AppExtension
    Name = 'A string with a value between 2 and 255 characters in length that consists of alphanumeric characters, periods (except for the first character), and dashes only.'
    Id = 'A string with a value between 2 and 39 characters in length that consists of alphanumeric characters, periods (except for the first character), and dashes only.'
    PublicFolder = 'A string with a value between 1 and 256 characters in length that cannot contain these characters: <, >, :, ", |, ?, or *.'
    DisplayName = 'A string with a value between 1 and 256 characters in length.'
    Description = 'A string between 1 and 2048 characters in length.' >

  <!-- Child elements -->
  uap3:Properties?

</uap3:AppExtension>

答案

? 選擇性 (零或一個)

屬性和元素

屬性

屬性 描述 資料類型 必要 預設值
描述 應用程式的描述 長度介於 1 到 2048 個字元之間的字串。 No
DisplayName 應用程式延伸模組的易記名稱,可向使用者顯示。 長度介於 1 到 256 個字元之間的字串。 Yes
Id 如果有多個進入點,則主應用程式存取延伸模組類別實例的進入點。 長度介於 2 到 39 個字元之間的字串,其中包含英數位元、句點 (,但第一個字元) 和虛線除外。 Yes
名稱 應用程式想要取用和/或主機的擴充功能類型。 長度介於 2 到 255 個字元的字串,包含英數位元、句點 (,但第一個字元) 和虛線除外。 Yes
公用資料夾 實例宣告為主機可透過訊息代理程式讀取檔案之位置的資料夾。 長度介於 1 到 256 個字元之間的字串,不能包含下列字元: < 、、 >:|" 、、 ? 或 。 * Yes

子元素

子項目 描述
uap3:Properties 包含不透明的 XML,代表僅儲存且不是由作業系統讀取的自訂擴充功能特定資訊。 此資訊只會由主機應用程式讀取。

父元素

父元素 描述
uap3:Extension 宣告應用程式的擴充點。

範例

下列範例指出應用程式裝載或取用低效能瀏覽器擴充功能

<Package
    xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"  
    IgnorableNamespaces="... uap3">
    <Applications>
        <Application>
            <Extensions>
                <uap3:Extension 
                    Category="windows.appExtension">  
                    <uap3:AppExtension
                        Name="com.microsoft.browser.ext"
                        Id="Extension.Low.Performance"
                        PublicFolder="public\lowperf"
                        DisplayName="Low Performance Extension"/>  
                </uap3:Extension>  
              </Extensions>
        </Application>
    </Applications>
</Package>

規格需求

Item
Namespace http://schemas.microsoft.com/appx/manifest/uap/windows10/3
OS 最低版本 Windows 10版本 1607 (組建 14393)