Science and technology is my lover.
你好,Silverlight 中显示图片一般使用 Image 控件,设置 Image.Source 属性一般用以下代码:
myImage.Source = new BitmapImage(new Uri("myPicture.jpg", UriKind.RelativeOrAbsolute));
而根据 MSDN 文档,The BitmapImage can be used to reference images in the JPEG and PNG file formats.
不过,网上还是有一些 workaround,请参考:
http://imagetools.codeplex.com/
http://www.codeproject.com/Articles/37113/Silverlight-2-0-Supporting-unsupported-image-forma
Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework