0

I am developing a PowerPoint AddIn using C#. In PowerPoint's default ribbon, the ShapeFill button is implemented as a split button—where the left side functions as a regular button, and the right side is a gallery of colors for filling shapes.

I would like to replicate this functionality in my custom ribbon, but I am not sure how to properly implement a split button with this type of behavior. Specifically, I need the left button to trigger an action and the right gallery to display color options for filling shapes.

Is there a way to directly reuse PowerPoint's built-in ShapeFill button in a custom ribbon, or will I need to recreate the split button and gallery functionality manually? Any guidance or examples would be appreciated.

https://learn.microsoft.com/en-us/openspecs/office_standards/ms-customui/f2a8e3c0-14cb-4ad3-88cd-a8b5b1b9a8a0

Microsoft says the 'ShapeFillColorPicker' is a gallery. I currently have this code in my Ribbon.xml but the button is not the same as the PowerPoint built-in one.

<gallery idMso="ShapeFillColorPicker" showLabel="false" size="normal" supertip="Select color for shape"/>
<gallery idMso="ShapeOutlineColorPicker" showLabel="false" size="normal" supertip="Select color for shape outline"/>
<gallery idMso="TextFillColorPicker" showLabel="false" size="normal" supertip="Select color for text"/>

1 Answer 1

0

Problem solved. Just use 'control' in the Ribbon.xml instead of 'button'.

https://learn.microsoft.com/en-us/openspecs/office_standards/ms-customui/f2bf1b5d-0492-46a4-88f7-dc1a9528f755

This will clone the original MS PowerPoint button.

 <control idMso="Paste" size="large" />
Sign up to request clarification or add additional context in comments.

1 Comment

I'm glad you resolved the issue you encountered. You can accept your own answer, so if others face a similar problem, they can find the solution more quickly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.