简体   繁体   中英

How can I put a BackgroundImage in Xamarin.Forms UWP?

Good Day everyone. I'm currently creating the UWP part of my Xamarin.Forms Project and I want to put a BackgroundImage in it. I've noticed that the images I used in Xamarin.Forms.Droid are not being displayed on my UWP. Why is that so?

I used this code BackgroundImage="filename.jpg"

Check the image and make sure that you place your images in the application's root directory with Build Action: Content .


Edit :

I suggest you to modify the code as :

BackgroundImage="//Assets/filename.jpg"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM