How to upload a PNG resource image to Silverlight?

I am trying to add a png image resource to a specific Silverlight project folder. I would like to refer to this image in my tag? It seems to me that this works when the xaml file containing the image tag is in the same directory as the png file.

For example, in the xap file, the png file will be located in the xap \ resource \ image1.png file, and my xaml file will be in the root directory xap \ consumeImageA.xaml.

+5
source share
3 answers

I found a blog post discussing USING URIS IN EXPRESSION BLEND , which works for me.

  • ://:,,//happyface.png . XAML,
    .

  • ://:,,/WpfApplication6; /Images/happyface.png , Blend !

+2

, XAP, .. , XAP . Shawn Wildermuth XAP Web ClientBin, . , .

+1

, , . , .

, resource/image1.png

0

All Articles