How to change the size of commandbar button icon displayed in Outlook 2010 ribbon?

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

How to change the size of commandbar button icon displayed in Outlook 2010 ribbon?
 
Marek Tomša




Posts: 41
Joined: 2009-01-05
We are adding Outlook 2010 support to our 2007 addin that is using a CommandBar.

The problem is that the icon is very small (compared to the ribbon) - the 16px version is used, despite the fact that the Icon itself has also the 64px size embedded.

commandBarButton initialization code:


      private AddinExpress.MSO.ADXCommandBarButton commandBarButton;

      this.commandBarButton.Caption = "Caption";
      this.commandBarButton.ControlTag = "958574F9-9616-4d40-982A-A51DF169DFEC";
      this.commandBarButton.DisableStandardAction = true;
      this.commandBarButton.Image = 0;
      this.commandBarButton.ImageList = this.imgList;
      this.commandBarButton.ImageTransparentColor = System.Drawing.Color.Transparent;
      this.commandBarButton.St yle = AddinExpress.MSO.ADXMsoButtonStyle.adxMsoButtonIcon;
      this.commandBarButton.Temporary = true;
      this.commandBarButton.UpdateCounter = 17;
      this.commandBarButton.Click += commandBarButton_Click;


How to ensure that the ribbon-contained commandbar button will be bigger when displayed in Outlook 2010?
Posted 28 Sep, 2010 07:33:29 Top
Andrei Smolin


Add-in Express team


Posts: 9742
Joined: 2006-05-11
Hi Marek,

Being Ribbon-controlled, that button still conforms to the command bar rules (well, to most of them) and this is why you see the issue. I suggest that you add a Ribbon button onto your add-in module and set UseForRibbon=False in the command bar component that shows the commandBarButton above.

Also, may want to look at MS Office toolbar and Ribbon UI images style guide.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 28 Sep, 2010 08:49:37 Top