图标元素

按钮菜单控件定义一组 <Image> 元素。

加载项类型: 任务窗格,邮件

仅在以下 VersionOverrides 架构中有效

  • 任务窗格 1.0
  • 邮件 1.0
  • 邮件 1.1

有关详细信息,请参阅 清单中的版本替代

与以下要求集关联

  • 当父 <VersionOverrides> 类型为 Taskpane 1.0 时,AddinCommands 1.1。
  • 当父 <VersionOverrides> 类型为 Mail 1.0 时邮箱 1.3。
  • 当父 <VersionOverrides> 类型为 Mail 1.1 时邮箱 1.5。

属性

属性 必需 说明
xsi:type 要定义的图标类型。 这仅适用于移动外形规格中的图标。 MobileFormFactor 元素中包含的图标>元素必须将此属性设置为 。<bt:MobileIconList

子元素

元素 必需 说明
Image 要使用的图像的 resid

图像

按钮的图像。 resid 属性不能超过 32 个字符,并且必须设置为 Resources 元素中 Images 元素中 <Image>>元素的 id 属性<的值。 The size attribute indicates the size in pixels of the image. 有三个图像大小为必需(16、32 和 80 像素),另外还支持五个大小(20、24、40、48 和 64 像素)。

<Icon>
  <bt:Image size="16" resid="blue-icon-16" />
  <bt:Image size="32" resid="blue-icon-32" />
  <bt:Image size="80" resid="blue-icon-80" />
</Icon>

重要

如果此图像是外接程序的代表图标,请参阅 在 AppSource 和 Office 中创建有效列表 以了解大小和其他要求。

移动外形规格的其他要求

当父 <Icon> 元素是 MobileFormFactor 元素的后代时,所需的最小大小略有不同。 清单必须至少提供 25、32 和 48 像素大小。 所提供的每个大小必须出现三次,并将 scale 属性设置为 123。 此属性指定 UIScreen.scale iOS 设备的 属性。 有关详细信息,请参阅 缩放

<Icon xsi:type="bt:MobileIconList">
  <bt:Image resid="blue-icon-16" size="25" scale="1" />
  <bt:Image resid="blue-icon-16" size="25" scale="2" />
  <bt:Image resid="blue-icon-16" size="25" scale="3" />
  <bt:Image resid="blue-icon-32" size="32" scale="1" />
  <bt:Image resid="blue-icon-32" size="32" scale="2" />
  <bt:Image resid="blue-icon-32" size="32" scale="3" />
  <bt:Image resid="blue-icon-80" size="48" scale="1" />
  <bt:Image resid="blue-icon-80" size="48" scale="2" />
  <bt:Image resid="blue-icon-80" size="48" scale="3" />
</Icon>