I'm trying to do something which I would think is pretty simple, but I'm having no luck. I have a button that's using an image and when I resize the button, I'd like the image to resize along with it. I've tried HeightRequest and WidthRequest on the button, but it just resizes the button itself, not the image. I also tried putting the button inside a Stack Layout and setting fill and expand, but still no luck. Thanks in advance for any help
Asked
Active
Viewed 1,466 times
1 Answers
2
In order to resize the image, you should use DependencyService to do the resize operation on Android and iOS separately.
Check the following answer that contains an example for such implementation:
Xamarin Forms - Resize Camera Picture
You can also check the sample project dealing with resizing of an image on Xamarin's offical website:
https://developer.xamarin.com/samples/xamarin-forms/XamFormsImageResize/

Avi K.
- 1,734
- 2
- 18
- 28