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
Thank you so much for this post! I was having the same issue and this was able to resolve it. The image also seemed off-center, so I am also able to set the Margin property to adjust for this as well.
Adam Parkham
Tyler Technologies
New World Public Safety Division
Hello Anton,
The Horizontal and Vertical Alignments of the Image in the Template are set to Center, but the thing you can do is copy the default Style and set the Image's Stretch Property to None. This way it will remain 16x16 pixels, as you want. I created a sample project with this approach.
Stefan, I haven't seen ApplicationMenu template, but my feeling is that Image inside that button has Vertical and Horizontal Alignments set to "Stretch" and Stretch property set to Uniform or something, which leads images to be stretched.
Since the enlarging od the image is controlled by code, currently you are not able to change the Width and Height in XAML. You can suggest a product idea for adding ImageWidth and ImageHeight Properties in the ApplicationMenu item. You can do this here:
http://ideas.infragistics.com/
I've got same issue with resized image. Is it possible to workaround it in XAML not in code-behind?