在Silverlight中显示GIF [英] Displaying a GIF in Silverlight

查看:148
本文介绍了在Silverlight中显示GIF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网络服务器上的文件夹中有许多GIF /dir/subdir/bla.gif 等。

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

在同一台服务器上是一个Silverlight 3应用程序 /ClientBin/bla.xap

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

是否有有什么办法在Silverlight应用程序中显示GIF吗?

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

我试过< Image x:Name = img/> 然后在代码设置 this.img.Source = new BitmapImage(new Uri(/ dir / subdir / bla.gif))但没有成功。

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.

欢迎任何想法。

推荐答案

你可能会看看Silverlight Codeplex上的ImageTools: http://imagetools.codeplex.com/

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


项目描述



Silverlight的ImageTools是一个库,它提供额外的
功能,用于加载,保存和操作来自
不同来源和不同格式的图像。

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.

目前该库能够加载最重要的png,jpg,
bmp和gif格式。请看下面的演示和
选择应该显示的图像。如果出现错误消息
这意味着该文件尚未受支持,我非常高兴
用于附加图像的评论,用于测试。

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.

这篇关于在Silverlight中显示GIF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆