如何在Xamarin.Forms UWP中放置BackgroundImage?

Jay*_*sta 6 xaml xamarin xamarin.forms uwp uwp-xaml

今天是个好日子.我正在创建我的Xamarin.Forms项目的UWP部分,我想在其中放入一个BackgroundImage.我注意到我在Xamarin.Forms.Droid中使用的图像没有显示在我的UWP上.为什么会这样?

我使用了这段代码BackgroundImage ="filename.jpg"

Vai*_*esh 8

检查图像并确保将图像放在应用程序的根目录Build Action: Content.


编辑:

我建议你修改代码为:

BackgroundImage="//Assets/filename.jpg"
Run Code Online (Sandbox Code Playgroud)