首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何为我的excel外接程序设置带状图标

如何为我的excel外接程序设置带状图标
EN

Stack Overflow用户
提问于 2018-03-21 22:08:56
回答 1查看 290关注 0票数 1

我已经为我的excel丝带的按钮设置了图标。但它仍然显示默认图像:

代码语言:javascript
复制
<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时,默认图标就会出现!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-03-21 22:28:05

您提供的清单部分仅显示您创建的剩余名称。在清单的Resources部分中,您需要使用图标文件的URL来定义这些剩余值。

此外,对按钮图标的更改有时不会生效,除非您清除Office缓存。见清除Office缓存

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49417334

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档