maui
maui copied to clipboard
Button ImageSource not Scaling as expected.
Description
Using a Button and adding a ImageSource, svg, the image is not scaled as expected. According to Documentation: While Button defines an ImageSource property, that allows you to display a image on the Button, this property is intended to be used when displaying a small icon next to the Button text.
On the screenshots below the first component is a Button with ImageSource, and the Second is a HorizontalStackLayout with ImageButton and Label, set up with same HeightRequest.
iOS:
Android:
And since I am using it in a popup dialog from CommunityToolkit i'm unable to use method 2, since GestureRecognizers are not working.
xaml to reproduce:
Steps to Reproduce
- Remove content of VerticalStackLayout in Maui sample app.
- Add screenshot of xaml as content. (could not get 'code' to work)
Link to public reproduction project repository
No response
Version with bug
8.0.0-rc.2.9373
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
Verified this on Visual Studio Enterprise 17.8.0 Preview 5.0(8.0.0-rc.2.9373). Repro on Android 14.0-API34 and iOS 16.4, also repro on Windows 11 with below Project:
18242.zip
Windows(.NET 8):
In addition, the issue does not repro on Windows(7.0.96), but repro on Android 14.0-API34 and iOS 16.4 platform.
Windows(.NET 7):
The Windows behavior is blocking our upgrade to .NET 8.