Forum Visual Studio

[iOS] Xamarin Live Player setting BackgroundImage on Page throws ArgumentNullException

LoupiLoupi ZAMember

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 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?

Sign In or Register to comment.