Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Button with image

$
0
0

Hi all,
I need an urgent help please. I am trying to have a button with an image. Actually I simple want to show he image and have it behave as a button. I have created the button and gave it a widthrequest of 120 and Heightrequest of 120 also. I then placed an image of size 120x120. But the image does not get aligned with the button. It shifts somehow showing some parts of the button. How do I make the image alight exactly with the button.
Here's the code
Button btn = new Button
{
WidthRequest = 120,
HeightRequest = 120,
Image = "btnResults.jpg",
};


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>