How to add two ImageLists for Ribbon icons in16x16 and 32x32

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

How to add two ImageLists for Ribbon icons in16x16 and 32x32
 
Vladimír Klaus




Posts: 20
Joined: 2014-03-03
Hello

I look for possibility to define second ImageList, because 32x32 icons doesn't look well in 16x16 (stretch) version.

See example here:
http://temp.audrey.cz/addinexpress/SmallIcons.png

Vladimír
Posted 27 Mar, 2014 04:53:37 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hello Vladimír,

You can put another ImageList onto your add-in module and populate is with images. Then specify that ImageList and an image from it in the properties of the Ribbon control.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Mar, 2014 06:31:04 Top
Vladimír Klaus




Posts: 20
Joined: 2014-03-03
Hello Andrei,

sorry but I don't understand. TadxRibbonTab has only one ImageList. I'd like to set image index and button should display 32x32 or 16x16 version. It depends on space (width of Outlook window).

When I work wirh DevEx components there are LargeImageList and SmallImageList with "shared" image index.

Vladimír
Posted 27 Mar, 2014 06:44:46 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Vladimír,

Now you work with Office itself. Add-in Express components do not display the Ribbon directly (like DevExpress). Instead they create a markup that Office displays.

Vladimír Klaus writes:
I'd like to set image index and button should display 32x32 or 16x16 version.


I don't know if this is possible to achieve. Looks at http://msdn.microsoft.com/en-us/library/ee691834%28v=office.14%29.aspx - it creates a strong impression that this is impossible.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Mar, 2014 07:52:34 Top
Vladimír Klaus




Posts: 20
Joined: 2014-03-03
Hello Andrei,

I'm not professional in Ribbon/Office design. Maybe they have some special "internal" functions because when you look at new attachment there is pixel-perfect version of 16x16 icons (on the right) when I change width of Outlook window. No bad antialiasing, no "nearest neighbor" resizing.

http://temp.audrey.cz/addinexpress/IconQuality3.png

Vladimír
Posted 28 Mar, 2014 06:41:12 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Vladimír,

We will spend some more time on this. I'll let you know about our results on Tuesday.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 28 Mar, 2014 10:55:35 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hello Vladimír,

We've created a wrapper implementing the IPictureDisp interface so that Office is given our wrapper when it looks for an image. The wrapper allows checking if Office retrieves the second image in the underlying .ICO containing 32x32 and 16x16 images. The result: Office doesn't attempt to get the second image.

This means that the only workaround you have is to set AutoScale=false. This prevents your Ribbon group from autoscaling and in this way you disallow Office to spoil the images of your Ribbon controls.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 01 Apr, 2014 03:32:04 Top
Vladimír Klaus




Posts: 20
Joined: 2014-03-03
Hello Andrei,

thank you very much for your effort.

I suppose Office is able to load small image via internal callback. When I create button (Custom UI editor) with using their internal identification (imageMso="AllCategories") it automaticaly uses 2 versions when needed. When I use my icon (image="myicon") it only loads it as is.

http://temp.audrey.cz/addinexpress/IconQuality4.png

Vladimír
Posted 02 Apr, 2014 01:43:10 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Vladimír,

Alas, there's no such possibility in the Ribbon schema.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 02 Apr, 2014 02:24:09 Top