Share via


uap:FileType (uap:FileTypeAssociation/uap:SupportedFileTypes)

支援的檔案類型,指定為副檔名。

元素階層

<套件>

    <應用程式>

         <應用程式>

              <擴充功能>

                   <uap:Extension>

                        <uap:FileTypeAssociation>

                             <uap:SupportedFileTypes>

                                  <uap:FileType>

Syntax

<uap:FileType
  ContentType = 'An optional string with a value that contains two components between 1 and 127 characters in length, separated by a forward slash ("/"). It follows the RFC 4288 naming requirements.'
  uap4:ShellNewFileName = 'An optional string with a value between 1 and 256 characters in length that cannot contain these characters: <, >, :, ", |, ?, or *.'
  uap4:ShellNewDisplayName = 'A string with a value between 1 and 256 characters in length. This string is localizable.'>

<!-- A string between 1 and 64 characters in length that must begin with a period ("."), cannot have additional periods, and cannot contain these characters: <, >, :, ", /, \, |, ?, or *. -->

</uap:FileType>

答案

? 選擇性 (零或一個)

屬性和元素

屬性

屬性 描述 資料類型 必要 預設值
ContentType 內容的類型。 選擇性字串,其值包含長度介於 1 到 127 個字元之間的兩個元件,並以正斜線分隔 (/) 。 它會遵循 RFC 4288 命名需求。 No
uap4:ShellNewFileName 要複製到使用者起始 Shell New 命令之位置之封裝的檔案。 長度介於 1 到 256 個字元之間的選擇性字串,不能包含下列字元: < 、、 >:" 、、 |?* No
uap4:ShellNewDisplayName 當使用者將滑鼠停留在 Windows 檔案總管中的 [新增] 子功能表時,所顯示的檔案類型顯示名稱。 長度介於 1 到 256 個字元之間的字串。 這個字串可當地語系化。 No

子元素

無。

父元素

父元素 描述
uap:SupportedFileTypes (類型:CT_FTASupportedFileTypes) 定義與應用程式相關聯的檔案類型。 每個套件都是唯一的,而且區分大小寫。

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

規格需求

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