减小Outlook Explorer或Inspector窗口的宽度时,功能区将更改。我可以在VSTO插件中影响Office Ribbon的缩放方式吗?
此选项卡进一步以一定的宽度变为带有小箭头的单个图标,单击该选项卡的按钮/元素会在弹出窗口中显示。如何设置在这种情况下出现的图标?
下面是该标签的当前XML。
我还添加了一张图片,显示了缩小窗口时丝带的外观。
我无法从Microsoft找到新的XML标记,这真的是最新版本[MS-CUSTOMUI2]: Custom UI XML Markup Version 2 Specification
<tabs>
<!-- Creates a new App Tab on the inspector toolbar-->
<tab idMso="TabReadMessage">
<group id="AppGroup" label="App">
<!-- A toggle or ON/OFF button to Encrypt or Decrypt an email and show the current encryption -->
<toggleButton id="insDecryptButton"
getLabel="insDecryptButton_getLabel"
size="large"
onAction="insDecryptButton_ButtonClick"
getImage="insDecryptButton_getImage"
getSupertip="insDecryptButton_getSupertip"
getScreentip="insDecryptButton_getScreentip"
getPressed="insDecryptButton_getPressed"
getVisible="insDecryptButton_getVisible"/>
<!-- A Button with drop down that shows all the File Numbers in the Email. If there are no file numbers this will not appear. -->
<dynamicMenu id="insMenu"
getLabel="insMenu_getLabel"
size="large"
getImage="insMenu_getImage"
getVisible="insMenu_getVisible"
getSupertip="insMenu_getSupertip"
getScreentip="insMenu_getScreentip"
getContent="insMenu_getContent"/>
<!-- Button to upload the email or attachments to IPAS -->
<dynamicMenu id="upMenu"
getLabel="upMenu_getLabel"
size="large"
getImage="upMenu_getImage"
getVisible="upMenu_getVisible"
getSupertip="upMenu_getSupertip"
getScreentip="upMenu_getScreentip"
getContent="upMenu_getContent"/>
</group>
</tab>
答案 0 :(得分:0)
Office应用程序自行执行缩放优化。没有新的架构。相反,正如其他发布者所注意到的那样,您需要向所有getImage
控件提供group
回调。它应该看起来像这样:
C#: IPictureDisp GetImage(IRibbonControl control)
VBA: Sub GetImage(control As IRibbonControl, ByRef image)
C++: HRESULT GetImage([in] IRibbonControl *pControl, [out, retval] IPictureDisp ** ppdispImage)
Visual Basic: Function GetImage(control as IRibbonControl) as IPictureDisp
调用Invadiate
或InvalidateControl
可能会显示一个新图像(因此,您的回调将被调用)。
在以下文章中了解有关Fluent UI(又称为Ribbon UI)的更多信息:
如果您想了解有关动态自定义的更多信息,请查看: