Vamshi Verma Vamshi Verma - 5 months ago 30
C# Question

How to display GIF Image from URL in UWP using XAML?

I want to display this GIF from the following URL in my app:

Click here

I cannot implement this through the conventional process, it's just showing an image without any animations.

Answer Source

I don't know what's not working for you but I quickly made a demo project and the GIF shows fine.

MainPage.xaml:

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Image Height="200" Width="200" Source="{x:Bind ImageSource, Mode=OneWay}"/>
</Grid>

MainPage.xaml.cs

public sealed partial class MainPage : Page
    {
        private string ImageSource { get; set; }
        public MainPage()
        {
            this.InitializeComponent();
            ImageSource = @"http://api.wunderground.com/api/9270a990901ad2ce/animatedradar/animatedsatellite/image.gif?num=5&delay=50&rad.maxlat=47.709&rad.maxlon=-69.263&rad.minlat=31.596&rad.minlon=-97.388&rad.width=640&rad.height=480&rad.rainsnow=1&rad.reproj.automerc=1&rad.num=5&sat.maxlat=47.709&sat.maxlon=-69.263&sat.minlat=31.596&sat.minlon=-97.388&sat.width=640&sat.height=480&sat.key=sat_ir4_bottom&sat.gtt=107&sat.proj=me&sat.timelabel=0&sat.num=5";
        }
    }