简体   繁体   English

如何以 Xamarin 形式显示 gif 图像?

[英]How to display gif image in Xamarin form?

I have a gif image and I want to display it on screen app.我有一个 gif 图像,我想在屏幕应用程序上显示它。 I use library FFImageLoading to load gif image, but I can't display it in xamarin.forms 3.1.我使用库 FFImageLoading 加载 gif 图像,但无法在 xamarin.forms 3.1 中显示它。 I don't know whether other library support load gif image?不知道其他库是否支持加载gif图片? Please help me!请帮我! Thanks!谢谢!

FFImageLoading.Svg.Forms supports gif images. FFImageLoading.Svg.Forms 支持 gif 图像。 I'm having no problem displaying the gif using FFImageLoading.我使用 FFImageLoading 显示 gif 没有问题。

<ContentView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"  x:Class="MyApp.AnimationView" 
         xmlns:ffimageloading="clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms">

    <ffimageloading:SvgCachedImage HeightRequest="30" HorizontalOptions="FillAndExpand" VerticalOptions="Center" Aspect="AspectFill" x:Name="imageWave" Source="Wave.gif" Margin="0"/>

</ContentView>

Let me know if you need more information.如果您需要更多信息,请与我们联系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM