6

I have a number of gifs in a folder on my web server /dir/subdir/bla.gif etc.

On that same server is a Silverlight 3 application /ClientBin/bla.xap.

Is there any way to display the gifs in the Silverlight app?

I've tried <Image x:Name=img" /> and then in code setting this.img.Source=new BitmapImage(new Uri("/dir/subdir/bla.gif")) with no success.

Any ideas welcome.

McGarnagle
  • 101,349
  • 31
  • 229
  • 260
Saqib
  • 7,242
  • 7
  • 41
  • 55
  • I've finally create Gif Control for Silverlight using GifDecoder 3d Library wich was design for windows forms application in C#, orginal was in java and i've make modification to it so it can work with silverlight. And then i create a custom Usercontrol. https://gifsilverlight.codeplex.com/ – user3746785 Jun 17 '14 at 01:12

2 Answers2

6

You might look into Silverlight ImageTools on Codeplex: http://imagetools.codeplex.com/

Project Description

ImageTools for Silverlight is a library, which provides additional functionality for loading, saving and manipulation images from different sources and with different formats.

At the moment the library is able to load the most important png, jpg, bmp and gif formats. Please have a look at the following demo and select a image which should be displayed. If an error messages appears this means, that the file is not supported yet and I would very happy for a comment with the image attached, which you used for testing.

Community
  • 1
  • 1
Dave Swersky
  • 34,502
  • 9
  • 78
  • 118
4

Silverlight does not natively support GIF. If you want to spend some money, you can buy a third party control, such as this one: http://www.componentone.com/SuperProducts/ImageSilverlight/

bobbymcr
  • 23,769
  • 3
  • 56
  • 67