OfficeMenu 元素
定义要添加到 Office 上下文菜单的控件集合。 适用于 Word、Excel、PowerPoint 和 OneNote 外接程序。
外接程序类型: 任务窗格
仅在以下 VersionOverrides 架构中有效:
- Taskpane 1.0
有关详细信息,请参阅 仅外接程序清单中的版本替代。
与以下要求集关联:
属性
属性 | 必需 | 说明 |
---|---|---|
xsi:type | 是 | 定义的 OfficeMenu 类型。 |
子元素
元素 | 必需 | 说明 |
---|---|---|
菜单类型的控件 | 是 | 一个或多个 Control 对象的集合。 |
xsi:type
指定要在其中添加此 Office 外接程序的 Office 客户端应用程序的内置菜单。
-
ContextMenuText
- 选择文本时显示上下文菜单上的项,并且用户 (打开上下文菜单,例如右键单击所选文本) 。 适用于 Word、Excel、PowerPoint 和 OneNote。 -
ContextMenuCell
- 当用户 (打开上下文菜单时,显示上下文菜单上的项,例如右键单击电子表格上的单元格) 。 适用于 Excel。
示例
<OfficeMenu xsi:type="ContextMenuCell">
<Control xsi:type="Menu" id="Contoso.myMenu">
<Label resid="residLabel3" />
<Supertip>
<Title resid="residLabel" />
<Description resid="residToolTip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon1_16x16" />
<bt:Image size="32" resid="icon1_32x32" />
<bt:Image size="80" resid="icon1_80x80" />
</Icon>
<Items>
<Item id="myMenuItemID">
<Label resid="residLabel3"/>
<Supertip>
<Title resid="residLabel" />
<Description resid="residToolTip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon1_16x16" />
<bt:Image size="32" resid="icon1_32x32" />
<bt:Image size="80" resid="icon1_80x80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="residTaskpaneUrl2" />
</Action>
</Item>
</Items>
</Control>
</OfficeMenu>