❔ MAUI ImageButton Aspect not working

I'm working on a tool that should allow users to swap out an image in this ImageButton by clicking on it. On Mac it works fine (first screenshot). However, on Windows (second screenshot) it gets cropped no matter what settings I apply to it.
// Button XAML
  <ImageButton x:Name="Thumbnail_0" Aspect="AspectFill" Clicked="EditThumbnail" WidthRequest="445" HeightRequest="251" MaximumWidthRequest="445" MaximumHeightRequest="251"/>
// Image swapping
async void EditThumbnail(object sender, EventArgs e)
{
    var src = (ImageButton)sender;
        var width = src.Width;
    var height = src.Height;

        try
    {
                // My own thing
        var file = await FilePick.PickSource();
        if (!file.IsEmpty)
            src.Source = file;
    }
    catch (Exception ex)
    {
        Console.WriteLine(ex);
    }
}
Please advise
Screenshot_2023-05-11_at_7.png
Was this page helpful?