Simple loading of a GIF file

Oct 26, 2009 at 11:19 PM

I know this is a very basic subject but I just want to load an animated gif file into a Silverlight project. I have the references set and the decorders loaded. I'm using the follwing XAML for the image <local:AnimatedImage  x:Name="imgPumpkin" Source="Images/pumpkin.gif"  Margin="450,147,367,0" VerticalAlignment="Top" Stretch="Fill" Height="83" Width="120" BorderThickness="5" Background="Black" OpacityMask="{x:Null}">. I get no build errors but nothing loads in the image control. Any help with this would be greatly appreciated.

Oct 27, 2009 at 8:17 AM

Looks fine. I have just tested it, to see, if there is a bug, but it is working for me.


Where have you placed this image and what properties does it have in visual studio?

Oct 27, 2009 at 11:34 AM

I tried creating an ImageTools.Image object and with the code below and it worked.

            ImageTools.Image i = new ImageTools.Image();

            StreamResourceInfo sr = Application.GetResourceStream(
            new Uri("HollowHouse;component/Images/pumpkin.gif", UriKind.Relative));
            imgPumpkin.Source = i;

Is creating an ImageTools object in this manner required to load the control?

Oct 27, 2009 at 12:41 PM
No, it should work in xaml as well. Which version do you use? I
recommend to download the latest soure and build it.
Oct 27, 2009 at 9:59 PM

I'll give the latest build a shot and will eventually try some of the image filtering on jpg and png, Thank you for this great project.