声明 类型为 windows.fileTypeAssociation 的应用扩展点。 文件类型关联指示应用已注册以处理指定类型的文件。
元素层次结构
<包>
<应用程序>
<应用程序>
<扩展>
<uap:Extension>
<uap:FileTypeAssociation>
语法
<uap:FileTypeAssociation
Name = 'A string with a value between 1 and 100 characters in length.'
DesiredView = 'An optional string that can have one of the following values: "default", "useLess", "useHalf", "useMore", or "useMinimum".'
desktop2:UseUrl = 'An optional boolean value.'
desktop2:AllowSilentDefaultTakeOver = 'An optional boolean value.'
desktop5:ThumbnailTypeOverlay = 'A string with a value between 1 and 256 characters in length that ends with ".jpg", ".png", or ".jpeg" that cannot contain these characters: <, >, :, ", |, ?, or *. In this string, the / and \ characters cannot be the first or last characters. Also, the string can contain / or \ but not both.' >
<!-- Child elements -->
uap:DisplayName?
& uap:Logo?
& uap:InfoTip?
& uap:EditFlags?
& uap:SupportedFileTypes?
& uap2:SupportedVerbs?
& uap4:KindMap?
& rescap3:MigrationProgIds?
& desktop2:ThumbnailHandler?
& desktop2:OleClass?
& desktop2:DesktopPreviewHandler?
& desktop2:DesktopPropertyHandler?
& desktop3:PropertyLists?
& desktop7:Logo?
& desktop7:ProgId?
& desktop10:IconHandler?
</uap:FileTypeAssociation>
密钥
?
可选 (零个或一个) &
交错连接器 (可以按任意顺序发生)
特性和元素
属性
属性 |
说明 |
数据类型 |
必须 |
默认值 |
名称 |
文件类型关联的名称。 此名称可用于组织和分组文件类型。 该名称必须是不带空格的小写字符。 |
一个字符串,其值的长度介于 1 到 100 个字符之间。 |
是 |
|
DesiredView |
启动应用时要使用的屏幕空间量。 此视图模式首选项只是请求的值。 指定的首选大小不一定会被 Windows 遵循,因此,不应编写依赖于永不进入小于首选最小大小或大于首选最大大小的代码。 |
可具有以下值之一的可选字符串: default、 useLess、 useHalf、 useMore 或 useMinimum。 |
否 |
|
desktop2:UseUrl |
如果设置为 true,则指定应用程序可以在命令行上接受 URL 而不是文件名。 可直接从 Internet 打开文档的应用程序(如 Web 浏览器和媒体播放器)应使用此值。 启动应用程序且此值设置为 false 时 ShellExecuteEx ,默认行为会将 ShellExecuteEx 文档下载到本地文件,并在本地副本上调用处理程序。 |
可选的布尔值。 |
否 |
|
desktop2:AllowSilentDefaultTakeOver |
如果设置为 true,则应用将显示在“打开方式”列表中,但它不会是文件类型的默认应用。 |
可选的布尔值。 |
否 |
|
desktop5:ThumbnailTypeOverlay |
缩略图覆盖的图像资源。 |
一个字符串,其值长度在 1 到 256 个字符之间,以 、 或 结尾,不能包含以下字符:< 、、> : 、" | 、、 ? 或 * 。.jpeg .png .jpg 在此字符串中, / 和 \ 字符不能是第一个或最后一个字符。 此外,字符串可以包含 或 ,\ 但不能同时包含/ 两者。 |
否 |
|
子元素
父元素
要求
项 |
值 |
Namespace |
http://schemas.microsoft.com/appx/manifest/uap/windows10 |
Minimum OS Version |
Windows 10版本 1511 (内部版本 10586) |