I have a WPF application where I added the images as resources to the project (not from project settings, like how the 2nd answer does it here), so they are under a folder. I use them like this in xaml:
<Image Width="32" Height="32" Source="/Images/Effect.png" />
When I build this app, only the dependent dlls and the app itself is put into the Debug/Release
folder. The Icons that reside inside the project and the actual folders and files are inside the project's folder. Those aren't copied into Debug/Release
.
I am able to run this application from anywhere, and the images work, so it must be turning the relative paths to hard coded paths?
If that's the case, how am I gonna be able to distribute those Image files to other machines?
I want to be able to always have the Images relative to the app, both in reference and on disk.
Is this the best way or is there a better way? In the end, I want to easily distribute these images and the app to other machines.