Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set width of image inside button in Xamarin.Forms xaml?

I would like to know if it is possible to set the width and height of the image inside this button:

<Button Image="ic_music_white.png" BorderWidth="1" BorderColor="White" HeightRequest="56"  BackgroundColor="PowderBlue" HorizontalOptions="Center" Clicked="Button_Clicked">
</Button>

Any solution?

like image 410
Salvo Avatar asked Jun 09 '17 08:06

Salvo


1 Answers

On an iOS project, padding can adjust the size of the image within the button. If you have a width of 50, padding 10, the resulting image width will be 30.

like image 89
Digital Crayon Avatar answered Sep 20 '22 12:09

Digital Crayon