我已经为我的excel丝带的按钮设置了图标。但它仍然显示默认图像:
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
<OfficeTab id="TabHome">
<!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
<Group id="Excely.SheetExplorer.Group">
<!-- Label for your group. resid must point to a ShortString resource. -->
<Label resid="Excely.GroupLabel" />
<!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
<!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
<Icon>
<bt:Image size="16" resid="Excely.tpicon_16x16" />
<bt:Image size="32" resid="Excely.tpicon_32x32" />
<bt:Image size="80" resid="Excely.tpicon_80x80" />
</Icon>
<!-- Control. It can be of type "Button" or "Menu". -->
<Control xsi:type="Button" id="Excely.TaskpaneButton">
<Label resid="Excely.TaskpaneButton.Label" />
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="Excely.TaskpaneButton.Label" />
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="Excely.TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Excely.tpicon_16x16" />
<bt:Image size="32" resid="Excely.tpicon_32x32" />
<bt:Image size="80" resid="Excely.tpicon_80x80" />
</Icon>
<!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ShowMainMenu</TaskpaneId>
<!-- Provide a URL resource id for the location that will be displayed on the task pane. -->
<SourceLocation resid="Excely.Taskpane.Url" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>我应该把彩带的图像放在哪里?
更新:我发现问题不是来自清单设置。如果我将web项目配置从Local IIS更改为IIS Express,则图标工作正常。但是当它被设置为Local IIS时,默认图标就会出现!
发布于 2018-03-21 22:28:05
您提供的清单部分仅显示您创建的剩余名称。在清单的Resources部分中,您需要使用图标文件的URL来定义这些剩余值。
此外,对按钮图标的更改有时不会生效,除非您清除Office缓存。见清除Office缓存。
https://stackoverflow.com/questions/49417334
复制相似问题