This project is read-only.

Could not load gif Image

Jul 14, 2010 at 1:34 PM


I tried the ImageTools to get some gif or bmp images displayed inside my silverlight application, but only with medium success. I only have some lines inside my project and it work if the picture which should be loaded is inside the clientbin folder, but not when it is placed somewhere in the internet.

        private static AnimatedImage GetSmiley(string name)
            ImageTools.Image image = new ImageTools.Image();
            //image.IsLoadingSynchronously = true;
            image.UriSource = new Uri(name, UriKind.Relative);
            //image.UriSource = new Uri("", UriKind.Absolute);
            AnimatedImage smiley = new AnimatedImage();
            smiley.Stretch = System.Windows.Media.Stretch.None;
            smiley.Source = image;
            smiley.VerticalAlignment = VerticalAlignment.Bottom;
            smiley.Margin = new Thickness(0, 2, 2, 2);

            return smiley;
        public MainPage()



Does anybody have any suggestions how it would work?


Jul 14, 2010 at 8:00 PM
Hi, this is a because of a security restriction in silverlight: Does it throw an exception or is the LoadingFailed event raised? I think the first, which is definitly a bug. But nevertheless this is a known limitation.
Jul 16, 2010 at 6:31 AM
Yes it seems like it was the cross site restriction from silverlight, as I got the same error when loading the file with the WebClient. Thank you, that component is really good. silent