怎样引用动态路径的GIF图片?
有有不白 2013-11-23 11:59:29 如题:怎样引用动态路径中的GIF图片?
路径写在数据Linethree中, 但应该不能直接source="{Bingding Linethree}"吧?
如果在longlistSelector Resources模板中设定,就完全找不到imgGif这个Name
*************
现在的前台:
<Grid Grid.Row="1" Margin="12,0,12,0">
<it:AnimatedImage x:Name="imgGif" Stretch="Fill" />
</Grid>
现在的后台:
private const string gif = "/Assets/20131115.gif";
ImageTools.IO.Decoders.AddDecoder<GifDecoder>();
ImageTools.ExtendedImage image = new ImageTools.ExtendedImage();
image.UriSource = new Uri(gif, UriKind.Relative);
imgGif.Source = image;