views:

94

answers:

1

I'm trying to add an image to a button in my silverlight 3 application but cannot get the image to appear. I added a folder, named \images, to my Silverlight application folder and an using a relative path in the Source attribute of the Image. What am I doing wrong?

<Button Width="200"
        Height="200">
     <Image Source="images\document.png"></Image>
</Button>
+1  A: 

The easiest way to find out what is going on is to add an event handler for the ImageFailed event to see what URL it is trying to use.

You should probably try using forward slashes instead of back slashes, but I'm not sure if that is the real issue.

Bryant
Doh! Good catch! It was the back slashes...
Scott