daixinet

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

把图片生成资源,怎么在后台访问困扰了我几天,在网上也查了很多例子,各种说法都有

如:m_Image.Source = new BitmapImage(new Uri(@"Resources/Images/more.png", UriKind.Relative));

但是在实际进行过程中,访问不到。

经过测试,很简单就能访问到了:

Code:

m_Image.Source = new BitmapImage(new Uri("Images/more.png", UriKind.Relative));

 上两级文件夹:

m_Image.Source = new BitmapImage(new Uri("../../Images/cameraOpen.png", UriKind.Relative));

 

posted on 2012-09-06 09:35  daixinet.com  阅读(3088)  评论(0编辑  收藏  举报