none
vsto add-in: how to keep aspect ratio for image in Microsoft.Office.Tools.Ribbon RRS feed

  • Question

  • Hi,

    I want to use an image on a ribbon menu control in a vsto add-in. I use the visual studio interface to import a jpeg picture for the image property for the Microsoft.Office.Tools.Ribbon.RibbonMenu.

    The problem is that the control doesn't preserve the pictures aspect ratio. Also, after inserted, all the properties (like Size) of the image are not editable in the visual studio interface.

    Is there any solution to my problem?

    Thanks
    /Peeter

    Tuesday, June 5, 2012 8:47 AM

Answers

  • Hi Peeter,

    Welcome to the MSDN forum!

    I would choose to resize the image first before import the image to the project. Resize it, then make a screenshot for the new size, and use that screenshot for the resource image.

    Thanks.


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by pemok Thursday, June 7, 2012 9:49 AM
    Thursday, June 7, 2012 6:38 AM
    Moderator

All replies

  • Hi Peeter,

    Welcome to the MSDN forum!

    I would choose to resize the image first before import the image to the project. Resize it, then make a screenshot for the new size, and use that screenshot for the resource image.

    Thanks.


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by pemok Thursday, June 7, 2012 9:49 AM
    Thursday, June 7, 2012 6:38 AM
    Moderator
  • Thank you. That will be a sufficient solution.

    Peeter

    Thursday, June 7, 2012 9:49 AM