在 Silverlight 中显示 GIF

发布于 2024-08-06 06:01:51 字数 349 浏览 4 评论 0原文

我的 Web 服务器上的一个文件夹中有许多 gif /dir/subdir/bla.gif 等。

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

有没有办法在 Silverlight 应用程序中显示 gif?

我尝试过 然后在代码设置中 this.img.Source=new BitmapImage(new Uri("/dir/subdir/bla .gif")) 没有成功。

欢迎任何想法。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

-黛色若梦 2024-08-13 06:01:52

您可以查看 Codeplex 上的 Silverlight ImageTools:http://imagetools.codeplex.com/

项目描述

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

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

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.

满地尘埃落定 2024-08-13 06:01:52

Silverlight 本身并不支持 GIF。如果你想花点钱,你可以购买第三方控件,比如这个: http: //www.componentone.com/SuperProducts/ImageSilverlight/

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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文