Why does the ImageButton width not adjust to the new width? #16878
IrisClasson
started this conversation in
Upgrading from Xamarin
Replies: 1 comment 3 replies
-
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm migrating an app from Xamarin to MAUI and I'm having layout issues. One of the problems is that the ImageButton doesn't seem to use it's new width when a HeightRequest is set (and AspectFit). The image varies in size and ratio, and therefore a set width isn't an option (the code below is greatly simplified, IRL its a custom control). The original image is large and its source (ImageSource) points to images that have different sizes/aspect ratios).
The questions are:
Why is the behavior different?
How do I fix this?
Example code (original code is complex, its a custom control and we use handlers etc.)
MAUI
Xamarin

Beta Was this translation helpful? Give feedback.
All reactions