Bug 22115 - Setting BindingContext to null doesn't remove rendered content
Summary: Setting BindingContext to null doesn't remove rendered content
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-08-14 12:25 UTC by Miha Markic
Modified: 2015-02-27 06:47 UTC (History)
4 users (show)

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

sample (77.74 KB, application/zip)
2014-08-14 12:37 UTC, Miha Markic

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 Miha Markic 2014-08-14 12:25:14 UTC
Attached is sample tested on Android, Windows Phone won't load image (I'll post a bug report on that as well)

To repro:
Run attached Android project, click on second button (BindingContext = null) and see that nothing happens. It shuold remove the content.

=== Xamarin Studio ===

Version 5.3 (build 423)
Installation UUID: 8e654e5a-bd6e-4158-9e5d-20c7bc16810a
	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 12:37:13 UTC
Created attachment 7693 [details]
Comment 2 Sadik Ali 2014-08-21 09:05:01 UTC
I can reproduce the reported behavior. Setting BindingContext to null doesn't remove rendered content. 

When I click  the "BindingContext = null" button, I observed that nothing happening when we set the BindingContext=null.

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

I’ll need confirmation from the developer if this is a bug. Leaving as NEW for now.

Environment Info:

Windows Info:

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 (0b2a123923812a88ed3091909478dbe9e0111f00)

Mac Info:

OS X 10.9.2
Xamarin.iOS: (Enterprise Edition)
Mono 3.8.0 ((no/62a857e)
Xcode 5.1.1 (5085)
Comment 3 Jason Smith [MSFT] 2015-02-27 06:47:31 UTC
Setting the binding context to null does not unapply any data that was inherited from the binding context.