ADXRibbonSeperators and CenterVertically don't work as expected

Add-in Express™ Support Service
That's what is more important than anything else

ADXRibbonSeperators and CenterVertically don't work as expected
Two issues in designing an ADX ribbon for a .NET Add-In 
mio




Posts: 84
Joined: 2009-03-05
Hello, everybody.

We have created an adx add-in for Microsoft Word with one ribbon tab. On this tab there is a ribbon group on which we have replicated the 'Fonts' ribbon group of Word via MsoIds with few adjustments. However, we cannot take over the complete group here, as we do not want to display all and replace some controls.

This also works - but all short ADXRibbonSeperators inserted in the designer (in detail in a RibbonButtonGroup) are not displayed at runtime. They are present in the adx designer and the Visible-property is set to true.

Please have a look at the attached screenshots for comparison:

Designer

[img]https://madeinoffice-my.sharepoint.com/:i:/p/linden/EVQbRDC08CtMrHVDNp_QgvABmwuxbtJ3GAcCY48kUXazkg?e=VtmkB9[/img]

At Runtime

[img]https://madeinoffice-my.sharepoint.com/:i:/p/linden/EdLVlU5ADS9Bng5P1x0LyiYBbuHC9aFRhB3g-gZ2A8knVQ?e=wCjxKD[/img]

Is this a known issue or are we doing something wrong?

Furthermore, we were not able to center two rows vertically in a RibbonGroup as they are displayed in Word. The property CenterVertically on the ADXRibbonGroup is already set to True. Unfortunately, the two contained rows have only slipped a bit downwards, so that the distance to the upper border has increased. Is there any way to position the elements in such a way that they are vertically centered as in Word?

Word RibbonGroup

[img]https://madeinoffice-my.sharepoint.com/:i:/p/linden/EbKIsE8PesRMnaqeRSwLzosBxBCikSBeH97NyGzLyQDitw?e=CuGBlV[/img]

Our custom RibbonGroup

[img]https://madeinoffice-my.sharepoint.com/:i:/p/linden/EdLVlU5ADS9Bng5P1x0LyiYBbuHC9aFRhB3g-gZ2A8knVQ?e=wCjxKD[/img]

Thanks in advance!

Greetings,
Fabian
Greetings

Fabian
Posted 08 May, 2019 03:12:11 Top
Andrei Smolin


Add-in Express team


Posts: 17110
Joined: 2006-05-11
Hello Fabian,

Could you please send me the code creating these Ribbon controls?

What Office version do you use in these screenshots?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 08 May, 2019 06:38:40 Top
mio




Posts: 84
Joined: 2009-03-05
Hello Andrei,

thanks for your quick reply!

The ribbon is completely created with the Designer and we do not modify the controls manually. Please find the code for creating these ribbon controls here (I uploaded it in OneDrive, because otherwise the post becomes too unreadable due to the amount of code):

AddinModule.Designer.cs

The screenshots were taken with Office 2016 32bit.

Greetings,
Fabian
Greetings

Fabian
Posted 08 May, 2019 07:24:54 Top
Andrei Smolin


Add-in Express team


Posts: 17110
Joined: 2006-05-11
Hello Fabian,

Check https://social.msdn.microsoft.com/Forums/vstudio/en-US/e91965a7-048a-475d-8ee6-88b844ea5a82/custom-ribbon-options-vertical-center-alignment-of-two-rows-such-as-in-word-2007s-home-tab?forum=vsto.

Note that the ribbon Designer is an interpreter of the Ribbon XML that is created behind the scenes. The Designer may display this or that thing a bit differently from what you see in Office (which uses another interpreter of Ribbon XMLs).

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 08 May, 2019 10:19:49 Top
mio




Posts: 84
Joined: 2009-03-05
Hello Andrei,

Thank you for your research! In that case we will try to modify the Ribbon XML manually to get a similar view as in Word.

Is there any additional information about the ADXRibbonSeperators, too, or is it not currently supported the way we want to use them?

Greetings,
Fabian
Greetings

Fabian
Posted 09 May, 2019 02:21:19 Top
Andrei Smolin


Add-in Express team


Posts: 17110
Joined: 2006-05-11
Fabian,

I've created a vertical ribbon box and put your horizontal boxes into it. This doesn't work.

As to separators, I've checked the second one: Office invokes the PropertyChanging event in order to find out whether the separator is visible; the add-in sets e.Value=True. I assume this yet another Office issue.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 09 May, 2019 03:24:29 Top
mio




Posts: 84
Joined: 2009-03-05
Hello Andrei,

thank you for your review!
Then we try to solve the topic differently.

Greetings,
Fabian
Greetings

Fabian
Posted 13 May, 2019 02:44:23 Top