Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xamarin.forms Xamarin表单:Gif图像无法在UWP中加载FFimageloading_Xamarin.forms_Gif_Ffimageloading - Fatal编程技术网

Xamarin.forms Xamarin表单:Gif图像无法在UWP中加载FFimageloading

Xamarin.forms Xamarin表单:Gif图像无法在UWP中加载FFimageloading,xamarin.forms,gif,ffimageloading,Xamarin.forms,Gif,Ffimageloading,我正在使用ffimageload在项目中播放gif文件。它在android和ios上运行良好,但在UWP中不起作用 我已将以下NuGet包添加到解决方案中的每个项目中 Xamarin.ffi图像加载 Xamarin.FFImageLoading.Forms Xamarin.FFImageLoading.Transformations Xamarin.FFImageLoading.Svg Xamarin.FFImageLoading.Svg.Forms 在UWPMainPage.xaml.cs上添

我正在使用
ffimageload
在项目中播放gif文件。它在android和ios上运行良好,但在UWP中不起作用

我已将以下NuGet包添加到解决方案中的每个项目中

  • Xamarin.ffi图像加载

  • Xamarin.FFImageLoading.Forms

  • Xamarin.FFImageLoading.Transformations

  • Xamarin.FFImageLoading.Svg

  • Xamarin.FFImageLoading.Svg.Forms

  • 在UWP
    MainPage.xaml.cs
    上添加了以下代码:

    FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
    
    在XAML中:

    xmlns:ffimageloading="clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms"
    
    <ffimageloading:SvgCachedImage 
        HorizontalOptions="CenterAndExpand" 
        x:Name="GifImage" 
        Grid.Row="0"
        VerticalOptions="CenterAndExpand"
        WidthRequest="200"
        HeightRequest="200"
        Source="ic_dove_loading_xx.gif"/>
    
    xmlns:ffimageloading=“clr命名空间:ffimageloading.Svg.Forms;assembly=ffimageloading.Svg.Forms”
    

    Gif未在UWP应用程序中播放。windows部件中是否有针对UWP的其他设置?

    据我所知,这不适用于UWP,上次我检查时,它是一个未添加的增强功能

    更新

    当您检查FFImageLoading的Github问题时,有一个关于这一点的问题,作者解释了原因

    这是因为FFImageLoading在内部使用WriteableBitmap。我们需要添加一个新的逻辑来处理这个问题,并且不要对动画GIF使用WriteableBitmap


    好的是,他们已经添加了这一功能,作为v2.5的未来增强功能,该功能很快就会推出

    据我所知,这不适用于UWP,上次我检查这是一个未添加的增强功能

    更新

    当您检查FFImageLoading的Github问题时,有一个关于这一点的问题,作者解释了原因

    这是因为FFImageLoading在内部使用WriteableBitmap。我们需要添加一个新的逻辑来处理这个问题,并且不要对动画GIF使用WriteableBitmap

    好的是,他们已经添加了这一功能,作为v2.5的未来增强功能,该功能很快就会推出