luberda-molinet / FFImageLoading

Image loading, caching & transforming library for Xamarin and Windows
MIT License
1.42k stars 377 forks source link

Image won't load in Maui Windows app #1576

Open blmiles opened 11 months ago

blmiles commented 11 months ago

🐛 Bug Report

Implemented to negate caching issues in Maui iOS and Android apps. Works very well. Trying to run same app on Windows WinUI app, none of the images load into this control. If I swap out to use the std Maui Image control, images load and display.

using this: https://github.com/Redth/FFImageLoading.Compat for the Maui project. Cannot raise issue on that stream, so here it is...

Expected behavior

Load images in FFImageLoading control in WinUI app. EXACLTY same codebase as Android and iOS Apps.

Reproduction steps

This works:

                              <Image Aspect="AspectFit" Source="{Binding ImagePath}" >
                                    <Image.HeightRequest>
                                        <OnIdiom x:TypeArguments="x:Double" Phone="200" Tablet="375" Desktop="300"  />
                                    </Image.HeightRequest>
                               </Image>

This does NOT work

                                <ffimageloading:CachedImage CacheType="None" InvalidateLayoutAfterLoaded="True" Source="{Binding ImagePath}" Aspect="AspectFit" BitmapOptimizations="True" LoadingPriority="Highest"  >
                                    <ffimageloading:CachedImage.HeightRequest>
                                        <OnIdiom x:TypeArguments="x:Double" Phone="200" Tablet="375" Desktop="300"  />
                                    </ffimageloading:CachedImage.HeightRequest>                                    
                                </ffimageloading:CachedImage>

Version

FFImageLoadingCompat.Maui version 0.1.1

Platform: