我正在尝试为Windows Excel在OfficeJS中创建自己的选项卡。我使用Yeoman生成器创建了一个测试应用程序,并尝试将CustomTab和Label一起使用,但是功能区上没有任何显示。我不确定我是否正确理解CustomTab的用法。这是我的XML
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<CustomTab id="Tab.Home">
<Group id="CommandsGroup">
<Label resid="Tab.Label"/>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Control xsi:type="Button" id="TaskpaneButton">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Control>
</Group>
</CustomTab>
</ExtensionPoint>
从此XML,您正在引用Tab.Home,因此您的应用程序功能区位于“主页”选项卡上
<CustomTab id="Tab.Home">
如果要创建新的功能区选项卡,则可以更改此行:
<CustomTab id="NewRibbonTab.Tab1">