Bug 26338 - Unable to change page BackgroundImage from code
Summary: Unable to change page BackgroundImage from code
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.2
Hardware: PC Windows
: Normal normal
Target Milestone: 1.4.0
Assignee: Bugzilla
Depends on:
Reported: 2015-01-23 08:48 UTC by Radek Voltr
Modified: 2015-03-03 14:19 UTC (History)
6 users (show)

Is this bug a regression?: ---
Last known good build:

Test Sample (4.81 MB, application/zip)
2015-02-05 10:45 UTC, Abhishek

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Radek Voltr 2015-01-23 08:48:21 UTC
I have Forms app with Navigation page and content page on it. I want change background on page (during rotation of device but for test is possible to use button click). But it doesn't change at all. Code can looks like :

    public partial class MainScreen : ContentPage
        public MainScreen()
            BackgroundImage = "landscape.png";

        public async void ButtonAction(object sender, EventArgs args)
            BackgroundImage = "portrait.png";
Comment 1 Radek Voltr 2015-01-23 09:00:40 UTC
Update - problem is probably only on Android.

On iOS (iPhone 6 Plus) and WP8.1 (N930 Denim) looks ok, Android 4.4.4 on Nexus 5 don't work
Comment 2 Abhishek 2015-02-05 10:45:45 UTC
Created attachment 9663 [details]
Test Sample

I have tried this issue and able to reproduce the reported behavior at my end.

Steps to Reproduce:
1. create a Navigation Page and Content page on it.
2. On Content Page set background image  and on button click event described above set another Image.
3. Run the application on the Simulator/Device it is working fine, as on button click it change the background image .
4. Run the application on Emulator/Device it is not working fine, as on button click it is not changing the background image.

Screencast for IOS: http://www.screencast.com/t/J2tPOISmPBl
Screencast for Android:http://www.screencast.com/t/f51QKL5JKPKj

Application Output: https://gist.github.com/AkhileshKumar01/68a725723667af22f012
Android Device Log: https://gist.github.com/AkhileshKumar01/4e4941b4fdc90c2152c9
IDE Log: https://gist.github.com/AkhileshKumar01/02062bbf2f4503221c56

Build Info:

=== Xamarin Studio ===

Version 5.7.1 (build 15)
Installation UUID: 93e693b0-b53d-40f4-b29c-b61ff5cbe892
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.Mac ===

Version: (Business Edition)

=== Xamarin.Android ===

Version: (Business Edition)
Android SDK: /Users/xamarin23/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 3b3ef43
Build date: 2015-01-24 09:42:21-0500

=== Build Information ===

Release ID: 507010015
Git revision: ce24e991948c7f3d88b0194a14fc1996d848ef51
Build date: 2015-01-26 16:42:20-05
Xamarin addins: 6895e3222bfa6910524708aa0633ff3db99bc3a0

=== Operating System ===

Mac OS X 10.10.0
Darwin 800BC.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 3 Jason Smith [MSFT] 2015-02-26 17:38:44 UTC
SHould be fixed in 1.4.0-pre1
Comment 4 Parmendra Kumar 2015-03-03 11:01:04 UTC
I have checked this issue with Xamarin.Forms version and now its working fine at my end.

Hence closing this issue.