Today's problem is the weirdest so far...
I have some ship graphics listed under Images in the project resource list. I load these at start-up into Image objects so I can access them easily while the program is running and I won't have to load each graphic multiple times. Each time I add some new graphics to the resource list, there are no errors when they load and no errors when I assign the source property of a newly created image to their source property. However, the newly created image is blank on the screen. Then, after a while they will suddenly start working with no apparent reason and no code change. So I add more graphics and they don't work at first. After some time, ranging from a few minutes to a few hours they will start working too.
There must be some sort of refresh happening somewhere in Visual Studio but I have no idea how to manually trigger it. Even quitting and restarting VS doesn't change anything. It's definitely the image rather than the in-game objects because I have tried assigning new images to objects that are aready working, without success (for a while anyway).
The relevant lines of code are:
// On startup
imgWarshipFriendly = new Image();
imgWarshipFriendly.Source = new BitmapImage(new Uri("Images/NavalIcons/WarshipFriendly.png", UriKind.Relative));
// run-time - only start working after the new resources have been in the project for a while
image1.Source = imgWarshipFriendly .Source;
Steve