I have WPF project, inside the project I have one folder call Images, It contains some png and gif files. All the files in it is Build Action= Resources and Copy to Output Directory = Do not copy.
I use the following code to bind it to the Image:
ImageSource ImageStatus = new BitmapImage(new Uri("/MPAL;component/Images/usbreader0001.png", UriKind.Relative));
MPAL is my project name and default assembly.
I have a question, where is the image compile to? Because I am able to run it whitout anay problem.
Am I calling it the right method?
Thank you.
Build Action = Resources places the image in a file named projectname.g.resources. That Resource file is linked into your exe when compiled.