Application/Extensions) (Windows 10) 中的擴充功能 (

宣告封裝的擴充點。

元素階層

<套件>

    <應用程式>

         <應用程式>

              <擴充功能>

                   <擴展>

Syntax

<Extension
  Category = 'One of the following values: "windows.backgroundTasks", "windows.preInstalledConfigTask", "windows.updateTask", or "windows.restrictedLaunch".'
  Executable = 'A string with an optional value between 1 and 256 characters in length, that must end with ".exe", and cannot contain the following characters: <, >, :, ", |, ?, or *. Specifies the default executable for the extension. If not specified, the executable defined for the app is used.  If specified, the EntryPoint property is also used. If the EntryPoint property is not specified, the EntryPoint defined for the app is used.'
  EntryPoint = 'A string with an optional value between 1 and 256 characters in length. Represents the task handling the extension (normally the fully namespace-qualified name of a Windows Runtime type). If EntryPoint is not specified, the EntryPoint defined for the app is used instead.'
  RuntimeType = 'A string with an optional value between 1 and 255 characters in length that cannot start or end with a period or contain these characters: <, >, :, ", /, \, |, ?, or *.'
  StartPage = 'A string with an optional value between 1 and 256 characters in length that cannot contain these characters: <, >, :, ", |, ?, or *.'
  ResourceGroup = 'An alphanumeric string with an optional value between 1 and 255 characters in length. Must begin with a letter.'
  uap10:TrustLevel = 'An optional string value. If specified, it must be either "appContainer" or "mediumIL".'
  uap10:RuntimeBehavior  = 'An optional string value. If specified, it must be one of the following values:  "windowsApp", "packagedClassicApp", or "win32App".'
  uap10:HostId = 'An alphanumeric string with an optional value between 1 and 255 characters in length. Must begin with an letter.'
  uap10:Parameters = 'A string with an optional value between 1 and 32767 characters in length with a non-whitespace character at its beginning and end.'
/>

  <!-- Child elements -->
  BackgroundTasks?

</Extension>

答案

? 選擇性 (零或一個)

屬性和元素

屬性

屬性 描述 資料類型 必要 預設值
類別 套件擴充點的類型。 可以是下列其中一個值: windows.backgroundTaskswindows.preInstalledConfigTaskwindows.updateTaskwindows.restrictedLaunch Yes
EntryPoint 可啟用的類別識別碼。 長度介於 1 到 256 個字元之間的字串。 表示處理延伸模組的工作 (通常是Windows 執行階段類型) 的完整命名空間限定名稱。 如果未指定 EntryPoint,則會改用為應用程式定義的 EntryPoint。 No
可執行檔 預設啟動可執行檔。 長度介於 1 到 256 個字元之間的字串,必須以 .exe 結尾,且不能包含下列字元: < 、、 > 、、 :"|?* 。 指定延伸模組的預設可執行檔。 如果未指定,則會使用為應用程式定義的可執行檔。 如果指定,也會使用 EntryPoint 屬性。 如果未指定 EntryPoint 屬性,則會使用為應用程式定義的 EntryPoint。 No
RuntimeType 執行時間提供者。 通常會在應用程式中混合架構時使用。 長度介於 1 到 255 個字元之間的字串,長度不能以 . 或 包含 字元開頭或結尾: < 、、 > 、、 :"|?* No
StartPage 處理擴充點的網頁 長度介於 1 到 256 個字元之間的字串,不能包含下列字元: < 、、、 :>"|?* No
ResourceGroup 選擇性標記,用來將擴充功能啟用分組在一起,以供資源管理之用 (,例如 CPU 和記憶體) 。 請參閱Application@ResourceGroup中的一節。 長度介於 1 到 255 個字元之間的英數位元。 必須以字母開頭。 No
uap10:TrustLevel 指定延伸模組的信任層級。 選擇性字串值。 如果指定,它可以是下列其中一個值: appContainermediumIL No
uap10:RuntimeBehavior 指定延伸模組的執行時間行為。

如需詳細資訊和需求,請參閱 uap10:RuntimeBehaviorApplication (Windows 10) 元素主題。
選擇性字串值。 如果指定,它可以是下列其中一個值:「packagedClassicApp」、「win32App」 或 「windowsApp」。 No
uap10:HostId 指定擴充功能的主機執行時間識別碼。 長度介於 1 到 255 個字元之間的選擇性值英數位元。 必須以字母開頭。 No
uap10:Parameters 包含要傳遞至延伸模組的命令列參數。 僅支援傳統型應用程式。 長度介於 1 到 32767 個字元之間的字串,其開頭和結尾具有非空白字元。 No

子元素

子項目 描述
BackgroundTasks 定義 windows.backgroundTasks類型的應用程式擴充點。 背景工作會在專用的背景主機中執行;也就是說,沒有 UI。

父元素

父元素 描述
擴充功能 (類型:CT_ApplicationExtensions) 定義應用程式的一或多個擴充點。

下列元素的名稱與這個元素相同,但內容或屬性不同:

備註

如果未在 延伸模組上指定啟用資訊屬性,則會繼承自父 應用程式。 請參閱 Application 元素的備註一節。

擴充點是一種機制,套件可以透過作業系統所定義的方式新增功能。 擴充點是應用程式可以註冊以執行程式碼或使用目前套件資源的位置。 若要新增特定應用程式的功能,請使用Applications元素的Application子項目。

windows.certificates擴充點無法在資訊清單中宣告多次。

注意

如果Category屬性是 windows.UpdateTaskwindows.preInstalledConfigTask 或 Windows 10 ,在 Windows 10 版本 1607 之前,必須有EntryPointStartPage屬性。 從 Windows 10 1607 版開始,當Categorywindows.UseUpdateTask時,您不再需要指定EntryPointStartPage的值,或 windows.preInstalledConfigTask 只以執行 Windows 10 版本 1607 或更新版本的裝置為目標。

另請參閱

應用程式合約和延伸模組的概念

規格需求

Item
命名空間 http://schemas.microsoft.com/appx/manifest/foundation/windows10
uap10 http://schemas.microsoft.com/appx/manifest/uap/windows10/10