dotnet / dotnet/maui

Button.ImageSource stretch the image on Windows, respect the original image size on Android

Open
#11,784 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-controls-button platform/windows s/triaged s/verified t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 14h
Merged PRs (30d)
296

Description

### Description

I suppose the expected behavior is to keep the original image size, so the bug is on windows.

### Steps to Reproduce

Add a button with an ImageSource.

On Windows the image is streatched, on Android the image has its original dimensions.

### Link to public reproduction project repository

https://github.com/rmotta01/MauiBugBtnImgSource01

### Version with bug

7.0 (current)

### Last version that worked well

Unknown/Other

### Affected platforms

Windows

### Affected platform versions

windows10.0.19041.0

### Did you find any workaround?

Add a button with an ImageSource.

On Windows the image is stretched, on Android the image has its original dimensions.

### Relevant log output

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked public reproduction project and compare the Button ImageSource behavior on Windows and Android. The work is done when the Windows button preserves the image's original dimensions consistently with Android.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
desktop, frontend, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.