xaml写法:
<Image x:Name="xImage" Stretch="Uniform"
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
相关文章:
-
2022-02-24
-
2021-05-28
-
2022-02-24
-
2022-12-23
-
2021-07-27
猜你喜欢
-
2022-12-23
-
2021-05-18
-
2021-12-18
-
2022-02-15
-
2022-12-23
-
2022-12-23
-
2021-11-13
相关资源
-
下载
2023-03-16
-
下载
2022-12-20
-
下载
2023-02-04