[Windows] ImageButton Aspect Property Not Working for Various ImageSource Types
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 290
Description
### Description
The Aspect property of the .NET MAUI ImageButton control does not render correctly on Windows for various ImageSource types. The behavior is inconsistent and does not match the expected output seen on other platforms .
Below is a summary of the observed behavior on Windows are not working.
SourceImageType
Aspect
FileImageSource
AspectFill
UriImageSource
Center
StreamImage
AspectFill, Center
FontImageSource
No Difference for all aspects
|Other Platforms | Actual Output |
|-----------------|---------------|
| | |
### Steps to Reproduce
1. Run the attached sample [ImageButtonSample 3.zip](https://github.com/user-attachments/files/20709116/ImageButtonSample.3.zip)
2. Switch between different image sources (File, Uri, Stream, FontImage) and change the Aspect using the radio buttons(refer table)
3. Observe the rendering of the ImageButton on Windows.
Expected Output: The ImageButton control should respect the Aspect property consistently across all platforms and image source types.
### Link to public reproduction project repository
_No response_
### Version with bug
9.0.70 SR7
### Is this a regression from previous behavior?
Not sure, did not test other versions
### Last version that worked well
_No response_
### Affected platforms
Windows
### Affected platform versions
_No response_
### Did you find any workaround?
_No response_
### Relevant log output
```shell
```
Contributor guide
Research direction
Run the attached ImageButtonSample 3.zip on Windows and exercise each image source and Aspect combination listed in the issue. Trace the ImageButton control's Windows rendering path and compare it with other platforms; done means all listed image sources respect AspectFill and Center as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100