I have a WPF app with image resources. When I build the program, there is a directory named “resources” in the bin folder containing my images. If I run the program without the folder, it crashes. How can I embed the resources in the app so it can run stand alone?
Share
You have to set the build action of the image files to
Resource, like shows here. The Uri for an image file namedImage.pngwould then be this:See also the MSDN page Pack URIs in WPF.