使用相同的Uri删除缓存的图像

时间:2019-02-08 10:19:45

标签: c# xamarin xamarin.forms xamarin.android

删除具有相同Uri的缓存图像(始终使用旧的缓存图像)

我尝试使用FFImageLoading CachedImage.InvalidateCache(_userProfileImagePath,CacheType.All,true); 并使用常规图片设置CachingEnabled =“ False”

               <ImageButton 
                    Command="{Binding SetPageCommand}"
                    CommandParameter="{Binding MenuItems[8].TargetType}"
                    BackgroundColor="Transparent"
                    IsVisible="{Binding IsProfileImageFound}"
                    x:Name="ImageButtonPhoto"              
                    Aspect="AspectFit"
                    HorizontalOptions="Start"
                    VerticalOptions="Start"              
                    Margin="5"
                >
                    <ImageButton.Source>

                        <UriImageSource Uri="{Binding UserProfileImagePath}"
                                        CachingEnabled="False"/>
                    </ImageButton.Source>

                </ImageButton>

0 个答案:

没有答案