I have two separate office add-ons which I would like to be displayed on the same ribbon tab. These projects are separate and I cannot combine them into one solution. Currently if I set t开发者_运维技巧he controlId of both add-ons to the same value and also the Label for the tab to the same value they appear as two separate tabs but with the same name.
I think this blog will help: http://xldennis.wordpress.com/2009/03/11/sharing-custom-tabs-in-the-ribbon-ui/
As I firstly thought using the same controlId would be enough, and you stated it won't work, I don't think you can do it without converting it to XML.
You could also try to use the same name for the OfficeRibbon, but my guess is it won't work.
I have solved this by setting the ControlId to 'Office' and set the same '(Name)' and 'Label' in both applications. This way they both appear on the same tab. This is all achieved from the designer. I admit XML is better, but these are both existing add ons which I am not prepared to convert to XML.
精彩评论