-
Notifications
You must be signed in to change notification settings - Fork 1.9k
ImageButton dosen't scale Image correctly #25558
Copy link
Copy link
Closed
Labels
area-controls-buttonButton, ImageButtonButton, ImageButtonpartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/androids/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Metadata
Metadata
Assignees
Labels
area-controls-buttonButton, ImageButtonButton, ImageButtonpartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/androids/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
The ImageButton scales images wrong on Android, based on their height.
Under Windows this works fine.
I have not yet tested this on iOS.
Here are two screenshots, for reference I have added a normal button with the same image above the ImageButton.
The normal button scales the image properly.
The image used is 880x202p.
Windows:

Android:

As you can see on Windows the scaling behaviour is the same, under Android it is not.
It appears to keep the height (202p) of the image and only scales the width.
An issue similar to this seems to have already been fixed for the regular button, however, on the ImageButton this problem persists.
#9734
Steps to reproduce
This is the app used in the example:
https://github.com/FabianDeDe/MAUI-ImageButton-Issue-Repro.git
I made a new MAUI app, removed the default hello world app code and added a Button and an ImageButton along with a picture, which is in Maui1\Resources\Images. (As seen in the code snippet above the screenshots)
Version with bug
8.0.82
Affected platform
Android
Platform version
33
Did you find any workaround?
No