Bug 22119 - Binding gets confused if changes are applied too early
Summary: Binding gets confused if changes are applied too early
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-08-14 13:27 UTC by Miha Markic
Modified: 2015-02-05 05:15 UTC (History)
4 users (show)

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


Attachments
Sample project (77.79 KB, application/zip)
2014-08-14 13:28 UTC, Miha Markic
Details


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:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Miha Markic 2014-08-14 13:27:24 UTC
In the attached sample I call an async method from the page constructor. The method waits for 10ms and then sets Image to null. However the change isn't reflected in renderer and even worse, you can't remove the image anymore afterwards.

To repro:
Run the Android application and see that Images are still present-even though the TestViewModel.Image has been set to null-plus button "BindingContext = null" doesn't do anything.

=== Xamarin Studio ===

Version 5.3 (build 423)
Installation UUID: 8e654e5a-bd6e-4158-9e5d-20c7bc16810a
Runtime:
	Microsoft .NET 4.0.30319.34011
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.25

=== Xamarin.Android ===

Version: 4.16.0 (Business Edition)
Android SDK: D:\Android\android-sdk
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		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)
		4.5    (API level 21)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode, sharing)

=== Build Information ===

Release ID: 503000423
Git revision: f4bb573b38a18c9f5400d8734eada2d5610deae4
Build date: 2014-08-12 17:31:43-04
Xamarin addins: 0961e1860cd1dcb4e47062f25c40d224979a02fb

=== Operating System ===

Windows 6.2.9200.0 (64-bit)
Comment 1 Miha Markic 2014-08-14 13:28:12 UTC
Created attachment 7695 [details]
Sample project
Comment 2 Ram Chandra 2014-08-21 10:34:38 UTC
I have checked this issue with attached sample and I am unable to reproduce this issue.

When I debug the attached sample, I observed that the image is loaded into the simulator and when we remove image from binding context using following code 

    vm.Image=null;

Image is removed from the binding context (Image property is null) but text (Text property) doesn't removed from the binding context. 

I have also tried BindingContext = null and try to assign a "new object()" to BindingContext and observed that the "Text" property disappear from the title but the value "Text" property is still exits i.e. "Turbo" .

Screencast: http://www.screencast.com/t/LcwHq4P3hTr

Environment Info:

Windows Info:
Xamarin.Forms: 1.2.2.6243
Windows 6.1.7601.65536 (64-bit)
Microsoft Visual Studio Professional 2013
Version 12.0.30501.00 Update 2
Microsoft .NET Framework
Version 4.5.50938
Installed Version: Professional
Xamarin   3.3.47.0 (0b2a123923812a88ed3091909478dbe9e0111f00)

Mac Info:
OS X 10.9.2
Xamarin.iOS: 7.2.6.28 (Enterprise Edition)
Mono 3.8.0 ((no/62a857e)
Xcode 5.1.1 (5085)