I'm writing a WPF app with VS2015. I have a User Control that contains an Image control. I have my image on the file system in an Images subfolder. In the Design mode, the image showed up fine, but when I ran it, it didn't. I specified the image location thus:
Source="Images/ball.png"
within the Image tag. I tried all the obvious things, like copying the folder to the bin\Debug
folder and such. Experimenting, this error message popped up over the Source
tag:
"Could not find a part of the path 'C:\Program Files (x86)\New folder\Microsoft Visual Studio 14.0\Common7\IDE\Images\red-ball.png'"
I finally got it to show up by giving it the FULL PATH to the image, but I really don't think I should have to. Isn't there a way to give it a relative path that's relative to the application and not the location of the IDE?