Metro style App 代码引用资源

之前的Uri(@"/.../...", UriKind.Relative); 运行时会出错。

var imgbrush = new ImageBrush();
imgbrush.ImageSource = new BitmapImage(new Uri("ms-resource://StrokePr04/Images/image_sample_01.jpg"));

 

posted @ 2011-12-22 15:58  Carrot  阅读(198)  评论(0编辑  收藏  举报