vijayst
vijayst

Reputation: 21836

Image Source in Windows Phone 8 application

I am creating an user control which has an image within it. The image has a build action = content.

<Image Source="/Assets/Images/Pic.png"/>

The above code is not working within the user control. The same code works well when the Image is placed within a PhonePage. Any pointers on how to resolve it?

Upvotes: 1

Views: 685

Answers (1)

Ric
Ric

Reputation: 8805

I think it is having a hard time with the path especially if the user control XAML isn't in the same directory as the phone page XAML. You may need to traverse a bit like this: ../Assets/Images/Pic.png You can also try moving Pic.png to the same directory and setting the source to Pic.png

Upvotes: 1

Related Questions