Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image files not displaying

In my XAML code I have written this:

<Image Source="/Images/male32.png" Visibility="Visible" />

and my project file structure looks like so:

enter image description here

But my image is just not loading?? As you can see I'm trying to add the male32.png image that I have in the Images folder in my project..


1 Answers

Check the build action of the Image.

Example: When you use "Build Action" of type "Content" then you access your image in this way:

<Image Stretch="None" Source="/images/appbar.cancel.rest.png"/>

When you use "Build Action" of type "Resource" then you access your image in this way:

<Image Source="/WP7SampleProject3;component/images/appbar.feature.email.rest.png"/>
like image 162
Boryana Miloshevska Avatar answered Dec 07 '25 10:12

Boryana Miloshevska



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!