首页 文章

无法将TaskpaneButton的默认图标更改为自定义图像

提问于
浏览
1

在Office Word 2016的功能区上尝试将标准图标更改为自定义TaskpaneButton时,我遇到了问题 .

我已将特定图像(大小:16X16,32X32,80X80)添加到我的项目解决方案中,并更改了清单中图像的路径 .

<!-- Control. It can be of type "Button" or "Menu". -->
            <Control xsi:type="Button" id="Contoso.TaskpaneButton">
              <Label resid="Contoso.TaskpaneButton.Label"/>
              <Supertip>
                <!-- ToolTip title. resid must point to a ShortString resource. -->
                <Title resid="Contoso.TaskpaneButton.Label"/>
                <!-- ToolTip description. resid must point to a LongString resource. -->
                <Description resid="Contoso.TaskpaneButton.Tooltip"/>
              </Supertip>
              <Icon>
                <bt:Image size="16" resid="Contoso.tpicon_16x16"/>
                <bt:Image size="32" resid="Contoso.tpicon_32x32"/>
                <bt:Image size="80" resid="Contoso.tpicon_80x80"/>
              </Icon>  
            </Control>
          </Group>
        </OfficeTab>
      </ExtensionPoint>
    </DesktopFormFactor>
  </Host>
</Hosts> 
<Resources>
  <bt:Images>
    <bt:Image id="Contoso.tpicon_16x16"
              DefaultValue="http://localhost:1234/wa/Images/R16X16.png"/>
    <bt:Image id="Contoso.tpicon_32x32"
              DefaultValue="http://localhost:1234/wa/Images/R32X32.png"/>
    <bt:Image id="Contoso.tpicon_80x80"
              DefaultValue="http://localhost:1234/wa/Images/R80X80.png"/>
  </bt:Images>

但是在将色带添加到功能区后,我看到了默认(蓝色六边形)图像 .

顺便说一句 . 我已经在办公室在线和Mac版本检查了它工作正常,我可以看到我的图标而不是默认图标 .

我还使用“Office上传中心”工具清理了Office的缓存,但结果是一样的 .

任何人都可以解释这个问题的主要原因吗?

1 回答

  • 2

    您需要使用 httpS 来托管图标 . 某些平台更加宽松,并且没有强制执行要求,这就是为什么您现在可以在Online中看到它正常工作的原因 .

相关问题