0
votes

I have a C# add-in that I am developing in Visual Studio 2019.

  • I have a single custom ribbon control that appears as a new tab in Excel whenever I run the add-in.
  • The NBWRibbon01.Designer.cs contains code for the custom ribbon groups and buttons shown below.
  • The application builds and runs without error.

Custom Ribbon that appears when the Excel Add-in is run.

However, when I launch the Designer for the same custom ribbon in Visual Studio 2019, I get an empty ribbon bar control shown below.

Ribbon Designer for the same Ribbon Bar in Visual Studio 2019

Has anyone encountered this issue? I am guessing that I will need to completely re-create the ribbon bar from scratch.

1
Do you get any errors in the output window of Visual Studio?Eugene Astafiev
Hi Eugene - no errors. I can do a Clean and Rebuild All. When I run, Excel launches and shows the CLIR dB ribbon bar as shown above. If I view the CLIR dB ribbon bar in the WinForms designer, I get the empty ribbon. I don't want to save anything in the designer as it would wipe out the existing ribbon. I'm thinking that the only thing to do is start a new ribbon from scratch and transplant.Doug Kimzey

1 Answers

0
votes

First of all, make sure the VSTO design-time adapter add-in is enabled in Excel.

VSTO design-time adapter add-in

Also check out the code-behind files, most probably any of them was edited to ruin the ribbon designer.

The Ribbon designer is good as a starting point in Visual Studio. But it doesn't support all the features that the Fluent UI provides. So, I'd suggest moving to the raw XML markup. You can design the base UI using the ribbon designer in Visual Studio and then export the custom markup to the ribbon XML. Read more about that in the How to: Export a ribbon from the Ribbon Designer to Ribbon XML article.