WPF 后台访问资源图片

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

如: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));
原文地址:https://www.cnblogs.com/sshoub/p/2672894.html