<
Image
x:Name
="xImage"
Stretch
="Uniform"
Source ="/pic;component/img.jpg" />
Source ="/pic;component/img.jpg" />
c#写法:
xImage.Source
=
new
BitmapImage(
new
Uri(
"
/pic;component/img.jpg
"
, UriKind.Relative));
其中 " /{0};component/{1} "
0为xap程序集的名字
1为tup在xap中的路径. "img.jpg"在根目录下. 要是有目录"_temp"下的话就应该为 " component/_temp/img.jpg"
参考: http://www.cnblogs.com/nasa/archive/2008/07/04/1235842.html
相关英文资料:http://blogs.msdn.com/katriend/archive/2008/04/27/different-ways-for-loading-images-and-files-in-silverlight-2-applications.aspx