Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 52938 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 20066 [details]
screenshot of the problem
Xamarin.Forms XAML Button has Image property but the image is being rendered different on each platform.
iOS renderer scales image to aspect-fit container (button itself), while Android renderer use fill strategy.
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:FormsApp2" x:Class="FormsApp2.FormsApp2Page">
<Button VerticalOptions="CenterAndExpand" WidthRequest="100" HeightRequest="50">
Revolutions_Button.png is attached.
Xamarin.Forms version 18.104.22.168/22.214.171.124
Thank you for filing this report! I will run the code you provided to try confirming this issue and I will update the report accordingly.
Created attachment 20075 [details]
I can reproduce this issue on Forms 126.96.36.199 and 2.3.4-pre2 using the attached project. I am confirming the report and the engineering team will look into this further.
When is this going to be added? While there exists a workaround with Image and TapGestureRecognizer, it's not the same because any styles and behaviour for buttons from the operating system are lost.
Perhaps should be addressed by the new ImageButton, a more appropriate control for the use case described here. https://github.com/xamarin/Xamarin.Forms/issues/1974