My problem is that the image only ever shows in the designer. It always shows there no matter what method I try, but once I actually start the program it’s nothing but white.
My XAML code:
<Grid.Background>
<ImageBrush ImageSource="C:\Users\Martin Clemens Bloch\Desktop\Mappe of
Text\DTU\Bachelor\Silverlight\OrgOS\OrgOS\Data\BackgroundS.jpeg"/>
</Grid.Background>
The Grid in question is at the very front so there should be nothing “blocking the view” to the background image,
The image has been added to the project and I have tried different build actions including “resource”, “content” and “embedded resource” combined with “copy always” and “do not copy”.
I have also tried a relative path of “/BackgroundS.jpg” while placing the image in the clientbin with the XAP file.. and other places.
I also tried putting the image INSIDE the XAP file by renaming the xap to zip and then back after putting the image.
I have also restarted VS2011.
Some I tried on my own, other stuff after numerous tutorials and stackoverflow questions.
Now we are talking about an IMAGE here, what am I doing so wrong!?
You need to include your image as a Resource in the silverlight project, and reference it like this: