Ok so I have a BasePage
class that inherits from ContentPage
. All my other pages inherit from BasePage
. In the BasePage
constructor I simply change the NavigationBar
icon (which works fine), but when I try to do BackgroundImage = "default.png";
I get the following error in Xamarin Live Player: Uncaught Exception: Value cannot be null. Parameter name: image (ArgumentNullException)
.
The image default.png
is located in the Resources
folder and its BuildAction = BundleResource
. I can add any image in XAML or code-behind files except BackgroundImage
is not working for me.
Tested the same code on a simulator and normal iPhone which builds through a Mac and both cases worked so it must be Xamarin Live Player. Any ideas as to how I might solve this?