Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
240
Image is resized in ribbon menu button
posted

Hi IG team,

I'm trying to put 16-bit image into ribbon menu round button. But image is being enlarged. How do I keep original image size ?   

<ribbon:XamRibbon.ApplicationMenu>

<ribbon:ApplicationMenu Image="/Controls.Biz.45;component/Images/price-watch-icon_16.png" />

</ribbon:XamRibbon.ApplicationMenu>

Regards,

Sergey


Parents
No Data
Reply
  • 138253
    Suggested Answer
    Offline posted

    Hello Sergey,

    Thank you for your post. I have been looking into it and I can suggest you handle the ApplicationMenu Loaded event and in the handler you can put the following code:

    Image img = Utilities.GetDescendantFromType(sender as DependencyObjecttypeof(Image), trueas Image;
    img.Height = 16;
    img.Width = 16;

     

    In order to set the Height and Width of the Image to the desired pixels. Please let me know if you need further clarifications on this matter.

    Looking forward for your reply.

Children