Missmatch between customUI.xml and ribbon layout

217 Views Asked by At

here is my code from my personal customUI XML-file. Everything seems to be fine but if I look at the layout on the ribbon the order of the last three favicons is different than here in the XML-file.

<mso:group id="mso_c6.2C0C7C46" autoScale="false">
(1)     <mso:control idQ="mso:ObjectsAlignLeftSmart" visible="true" showImage="true" showLabel="false" size="normal"/>
(2)     <mso:control idQ="mso:ObjectsAlignTopSmart" visible="true" showImage="true" showLabel="false" size="normal"/>
(3)     <mso:control idQ="mso:ObjectsAlignRelativeToContainerSmart" imageMso="FileNew" visible="true" showImage="true" showLabel="false" size="normal"/>
(4)     <mso:control idQ="mso:ObjectsAlignRightSmart" visible="true" showImage="true" showLabel="false" size="normal"/>
(5)     <mso:control idQ="mso:ObjectsAlignBottomSmart" visible="true" showImage="true" showLabel="false" size="normal"/>
(6)     <mso:control idQ="mso:ObjectsAlignSelectedSmart" imageMso="ShapesDuplicate" visible="true" showImage="true" showLabel="false" size="normal"/>
(7)     <mso:control idQ="mso:ObjectsAlignCenterHorizontalSmart" visible="true" showImage="true" showLabel="false" size="normal"/>
(8)     <mso:control idQ="mso:ObjectsAlignMiddleVerticalSmart" visible="true" showImage="true" showLabel="false" size="normal"/>
(9)     <mso:control idQ="mso:ShapeRectangle" visible="true" showImage="true" showLabel="false" size="normal"/>
(10)    <mso:control idQ="x1:Custombutton303" visible="true" showImage="true" showLabel="false" size="normal"/>
(11)    <mso:control idQ="x1:Custombutton304" visible="true" showImage="true" showLabel="false" size="normal"/>
(12)    <mso:control idQ="mso:ObjectSetShapeDefaults" imageMso="DiagramTargetInsertClassic" visible="true" showImage="true" showLabel="false" size="normal"/>
</mso:group>

I want it to look like this in the ribbon

(1) (4) (7) (10)

(2) (5) (8) (11)

(3) (6) (9) (12)

But in fact it looks like this:

(1) (4) (7) (12)

(2) (5) (8) (10)

(3) (6) (9) (11) ​

The (12) idQ="mso:ObjectSetShapeDefaults" appears above the Custombuttons (10) & (11).

Why? How can I make it to keep the order that I want it to? Is it because of the custombuttons? Do they always come behind the mso buttons?

Many thanks.

1

There are 1 best solutions below

1
On BEST ANSWER

The following attributes can be used for managing the order of controls:

insertAfterMso, insertAfterQ, insertBeforeMso, insertBeforeQ

Read more about the Fluent UI (aka Ribbon UI) in the following series of articles in MSDN:

Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)

Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)

Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)