Xamarin Live Player设置BackgroundImage on Page抛出ArgumentNullException

时间:2017-06-14 12:59:38

标签: visual-studio xamarin xamarin.forms xamarin-live-player

好的,我有一个继承自BasePage的{​​{1}}类。我的所有其他页面都继承自ContentPage。在BasePage构造函数中,我只需更改BasePage图标(工作正常),但当我尝试NavigationBar时,我在Xamarin Live Player中收到以下错误:BackgroundImage = "default.png";

图片Uncaught Exception: Value cannot be null. Parameter name: image (ArgumentNullException)位于default.png文件夹及其Resources。我可以在XAML或代码隐藏文件中添加任何图像,但BuildAction = BundleResource不适用于我。

在通过Mac构建的模拟器和普通iPhone上测试相同的代码,两种情况都有效,因此必须是Xamarin Live Player。关于如何解决这个问题的任何想法?

0 个答案:

没有答案
相关问题