maui icon indicating copy to clipboard operation
maui copied to clipboard

Button ImageSource not Scaling as expected.

Open mla03 opened this issue 2 years ago • 3 comments
trafficstars

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: image

Android: image

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: image

Steps to Reproduce

  1. Remove content of VerticalStackLayout in Maui sample app.
  2. 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

mla03 avatar Oct 23 '23 09:10 mla03

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.

ghost avatar Oct 23 '23 14:10 ghost

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): image

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): image

XamlTest avatar Oct 25 '23 06:10 XamlTest

The Windows behavior is blocking our upgrade to .NET 8.

lothrop avatar Nov 21 '23 11:11 lothrop