I would like to assign a BitmapImage
from my Resources.resx to an Image
.
Beforehand I saved a .png image to Resources.resx. This image is now located in "/Resources/logo.png".
After reading several SO posts and other articles I have this now:
logoImage.Source = new BitmapImage(new Uri(@"pack://application:,,,/Resources/logo.png"));
Unfortunately it doesn't work. I don't know how to solve this.
I tried to replace the Pack-URI
with the fullpath and it worked but I would like to use relative paths in order to use the same source on different machines on which the absolute path would be incorrect.
Can anyone help me out with this?