2

I'm developing a toolbar for a new Word 2010 template (.dotm). In the picture below I'm trying to describe what I want to mimic: the scrollbar-look-a-like element thing which displays available styles (this is original Microsoft Word 2010).

enter image description here

My question regards only the element.

Here is my CustomUI XML:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">

  <ribbon>
    <tabs>
      <tab id="tabESS" label="ESS">
        <!--<tab id="tabESS" label="ESS" insertBeforeMso="TabHome">-->

        <group id="grpExample" label="Styles">

          <!--Which elements should be used here?-->

        </group>


      </tab>
    </tabs>
  </ribbon>
</customUI>

This is driving me crazy, I cant figure out which element Microsoft has used. I've searched everywhere on the net but nothing gives me a clue. Does anyone know which element(s) should be used?

1 Answer 1

1

That's "Gallery" control, specifically an InRibbonGallery.

Example XML:

<Group CommandName="cmdInRibbonGalleryGroup" SizeDefinition="OneInRibbonGallery">
  <InRibbonGallery CommandName="cmdInRibbonGallery"
                   MaxColumns="10"
                   MaxColumnsMedium="5"
                   MinColumnsLarge="5"
                   MinColumnsMedium="3"
                   Type="Items">
    <InRibbonGallery.MenuLayout>
      <VerticalMenuLayout Rows="2"
                          Gripper="Vertical"/>
    </InRibbonGallery.MenuLayout>
    <InRibbonGallery.MenuGroups>
      <MenuGroup>
        <Button CommandName="cmdButton1"></Button>
        <Button CommandName="cmdButton2"></Button>
      </MenuGroup>
      <MenuGroup>
        <Button CommandName="cmdButton3"></Button>
      </MenuGroup>
    </InRibbonGallery.MenuGroups>            
  </InRibbonGallery>
</Group>
5
  • Thanks a lot! I'll try it the first thing in the morning back at work.
    – Hauns TM
    Commented Feb 12, 2014 at 20:45
  • 1
    Hmm... I might be doing something stupid but <InRibbonGallery /> doesn't seem to be a valid child in <group />-tag (according to xmlns="http://schemas.microsoft.com/office/2009/07/customui")? I do not doubt that Microsoft use that control in their ribbon, but maybe I should reformulate my question to: What element should I place in <group id="grpExample" /> (according to my example) to mimic the InRibbonGallery-thing? I use Custom UI Editor for Microsoft Office to create my ribbon tab.
    – Hauns TM
    Commented Feb 13, 2014 at 10:24
  • Actually, I went digging into this a bit myself, using VS2013 and the visual "Ribbon Designer" they supply. While I could add a "Gallery" object, there was no specific "InRibbonGallery" object, and no way to specifically change the "Gallery" into that mode (for lack of a better term). So I'm thinking perhaps there's only a Gallery object, and you just have to do something weird with rows column and images to get it to behave like the mentioned "InRibbonGallery" specifically. Commented Feb 13, 2014 at 16:12
  • So I think we're on the right track, but we're missing something, like perhaps up-to-date documentation. :) The whole subject of Galleries in the Ribbon seems to not be covered much. Hopefully someone else will have some additional help/answers. Plus if I figure anything out, I'll be back.. :) Commented Feb 13, 2014 at 16:12
  • I'm still interested in the final solution @techie007! :-). Thnx anyway!
    – Hauns TM
    Commented Feb 13, 2014 at 21:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .