sly_Chandan
sly_Chandan

Reputation: 3515

Image wont display in xamarin

I am not able to display the image on my Xamarin UWP app I have an Image in Assets folder:

 <Image x:Name="myBookImage1" Source="/Assets/Agile Coaching.jpeg"></Image>

Upvotes: 0

Views: 81

Answers (1)

Gerald Versluis
Gerald Versluis

Reputation: 34118

Is there any specific reason you want the image in the Assets folder?

To use then 'normally' you should put them in the root and set the build action to Content. You are then able to simply do this: <Image x:Name="myBookImage1" Source="Agile Coaching.jpeg"></Image>

Although I would try to prevent spaces in your filenames.

Also see: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/images?tabs=vswin#local-images

Upvotes: 1

Related Questions