How to fit an image to the size of the button in XAML

CarkCark GBUniversity ✭✭

Hi.

I am new to Xamarin.forms and new to XAML aswell.

I'm trying to create a button that is smallish with an image in it. However, the image that I'm trying to use is too big so the button is only displaying a small amount of the overall image. Is there any way that I can fit the image to meet the size of the button I am wanting to have?

Here's the code:

Thanks,

Mark

Tagged:

Best Answer

  • JohnHardmanJohnHardman GB mod
    edited March 2017 Accepted Answer

    @Cark - If you know your images will be 60x40 (or whatever size), create images that size. Having your app down-scale larger images on a low-powered mobile device eats CPU and memory, and makes your app sluggish.

Answers

  • JohnHardmanJohnHardman GBUniversity mod
    edited March 2017 Accepted Answer

    @Cark - If you know your images will be 60x40 (or whatever size), create images that size. Having your app down-scale larger images on a low-powered mobile device eats CPU and memory, and makes your app sluggish.

Sign In or Register to comment.