开发者

Double ribbon items for SplitButton

开发者 https://www.devze.com 2022-12-22 23:35 出处:网络
I develop MS Office add-in which extends ribbon in the following way: <customUI xmlns=\"http://schemas.microsoft.com/office/2006/01/customui\" loadImage=\"GetImage\" onLoad=\"OnRibbonLoad\">

I develop MS Office add-in which extends ribbon in the following way:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" loadImage="GetImage" onLoad="OnRibbonLoad">
 <ribbon>
  <tabs>
   <tab idMso="TabHome">
    <group id="MyAppGroup" label="MyApp">
      <splitButton id="SaveSplitButton" size="large" getEnabled="GetSaveButtonEnabled">
        <menu id="SaveMenu"开发者_开发问答 label="Save" itemSize="normal">
          <button id="SaveMenuButton" image="save.png" label="Save to MyApp" onAction="SaveCommand" screentip="Saves the document" />
          <button id="SaveAsMenuButton" label="Save to MyApp As" onAction="SaveAsCommand" screentip="Saves the document under a new name" getEnabled="GetSaveAsButtonEnabled"/>
        </menu>
      </splitButton>
    </group>
  </tab>
</tabs>

When I go to File > Options > Customize Ribbon (in any Office application) I expect to see "MyApp" group in "Home" tab with one "Save" menu having only one "Save to MyApp" and one "Save to MyApp As" subitems in it. But instead I get "Save to MyApp" item doubled under the "Save" menu.

I know that if I move "SaveMenuButton" from menu right into the splitButton then I'll get rid of that doubling but I need these two options in the menu.

Experts! Please help!

0

精彩评论

暂无评论...
验证码 换一张
取 消