Bug 23801 - IsVisible works consistently on iOS but not Android
Summary: IsVisible works consistently on iOS but not Android
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.3
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-13 19:08 UTC by Dan Vanderboom
Modified: 2016-03-18 08:37 UTC (History)
4 users (show)

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

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 FIXED

Description Dan Vanderboom 2014-10-13 19:08:11 UTC
My app hides and shows various views and subviews depending on what's happening. (It's a fairly sophisticated arrangement of views, which are quite deeply structured some places.)

I started by using IsVisible everywhere, flipping views on and off as needed. This was great, very simple, and works fantastically on iOS. But on Android, it works consistently in some places (and levels of XAML structure), but in others doesn't work at all.

My highest-level app menu used this technique with success on both platforms, until today when I added one more view to be flipped on and off like the rest.

In a deeper area of the app, where IsVisible seems to be entirely ignored by Android (even when calling ForceLayout, etc), I've resorted to putting the set of views inside a container with IsClippedToBounds=true, and then I TranslateTo/move them outside of the parent container. This works great, it solved my problem, but it is inelegant--ok, really it's just a plain ugly hack.

Even if I can somehow magically shuffle things around, choose different layout containers to organize things, etc., I still won't have a whole lot of confidence to put something so unpredictable in the hands of customers.

Which is why I suggest this bug is significant and deserving quick attention.

Recreating the precise combination of layouts and content to trigger such an intermittent bug would be onerous at best. If you'd like to see a reproduction, I could make a private copy of the app's code available for testing and troubleshooting by Xamarin.
Comment 1 Rajneesh Kumar 2014-10-14 10:36:41 UTC
I try to reproduce this issue but unable to reproduce. To reproduce this issue I have followed the help and instruction provided in bug description. I have used IsVisible property on BoxView and its working fine on iOS and android.

Could you please provide us small sample application, steps to reproduce, environment info ? That will be very helpful to reproduce this issue at our end.

Please let me know if I am missing anything.

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

Environment Info:

=== Xamarin Studio ===

Xamarin Forms

Version  1.2.3.6257

Version 5.5 (build 227)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.10.0 ((detached/47db868)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000019

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.Mac ===

Version: 1.10.0.13 (Business Edition)

=== Xamarin.Android ===

Version: 4.18.0 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		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: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.iOS ===

Version: 8.2.0.193 (Business Edition)
Hash: 959c1e4
Branch: 
Build date: 2014-10-03 00:25:37-0400

=== Build Information ===

Release ID: 505000227
Git revision: 7b721eeec7a2fa4c4f4de0ecd2aed4dc25edac95
Build date: 2014-10-02 15:53:38-04
Xamarin addins: 99ed56b428b31eba1efaace4d82188d6f334e6ca

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 2 Dan Vanderboom 2014-10-14 11:10:25 UTC
I don't think you read the bug description very carefully. I never claimed to have a problem setting the visibility of a single BoxView. The problem I'm experiencing involves a bunch of deeply-nested XAML layouts, with portions of it being made visible or invisible.

For example, my RootPage contains a Grid. Within one of the "cells" of the Grid (column and row), I have several ContentViews, all at the same location, filling the same area.

Inside one of THOSE views, I created a tab-control-like experience. When user pressed a tab button, it switches the visibility of ITS children.

In the simplest scenarios, IsVisible works fine. But in deeply-nested UI where IsVisible is being used at multiple levels... that's where I expect you'll find the problem.

Like I said in my original post, I can make a private copy of the app's source code available to Xamarin for troubleshooting, if desired, where you will be able to reproduce the problem immediately.
Comment 3 Dan Vanderboom 2014-10-14 11:32:26 UTC
After some experimenting, I have much more specific information now.

In one of the ContentViews I'm making visible or invisible, there is a ListView. In an override to OnBindingContextChanged, I set the ItemsSource of the ListView.

When I commented out this line (setting myListView.ItemsSource), the whole view became visible as expected. But when I uncomment this line, the ContentView no longer makes itself visible.

There must be some problem in setting ItemsSource which shortcuts whatever ends up causing the IsVisible = true to have a real effect on rendered pixels.
Comment 4 Dan Vanderboom 2014-10-14 11:36:27 UTC
I also see an unhandled exception when this happens. It's not getting caught in my catch block.

System.Diagnostics.Debugger.Mono_UnhandledException_internal () in 
System.Diagnostics.Debugger.Mono_UnhandledException (ex=) in 
object.3a608699-70bb-40a1-af94-e14cde33295a (Parameters=) in 
System.Lazy<object>.InitValue (Parameters=) in 
System.Lazy<object>.get_Value (Parameters=) in 
Xamarin.Forms.Xaml.ElementNode.<SetDataTemplate>b__9 (Parameters=) in 
Xamarin.Forms.DataTemplate.CreateContent (Parameters=) in 
Xamarin.Forms.TemplatedItemsList<Xamarin.Forms.ItemsView<Xamarin.Forms.Cell>,Xamarin.Forms.Cell>.CreateContent (Parameters=) in 
Xamarin.Forms.TemplatedItemsList<Xamarin.Forms.ItemsView<Xamarin.Forms.Cell>,Xamarin.Forms.Cell>.GetOrCreateContent (Parameters=) in 
Xamarin.Forms.TemplatedItemsList<Xamarin.Forms.ItemsView<Xamarin.Forms.Cell>,Xamarin.Forms.Cell>.get_Item (Parameters=) in 
Xamarin.Forms.Platform.Android.ListViewAdapter.GetCellsFromPosition (Parameters=) in 
Xamarin.Forms.Platform.Android.ListViewAdapter.GetCellForPosition (Parameters=) in 
Xamarin.Forms.Platform.Android.ListViewAdapter.GetView (Parameters=) in 
Android.Widget.BaseAdapter.n_GetView_ILandroid_view_View_Landroid_view_ViewGroup_ (Parameters=) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Widget.BaseAdapter.cs:460
object.3a608699-70bb-40a1-af94-e14cde33295a (Parameters=) in 
Android.Runtime.JNIEnv.CallVoidMethod (Parameters=) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:504
Android.Views.ViewGroup.Layout (Parameters=) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.ViewGroup.cs:3047
Xamarin.Forms.Platform.Android.ViewRenderer<Xamarin.Forms.ListView,Android.Widget.ListView>.OnLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.ListViewRenderer.OnLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (Parameters=) in 
object.afd080fc-c550-4fd2-b2d1-3d41774b55f9 (Parameters=) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (Parameters=) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.ListView>.UpdateLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (Parameters=) in 
object.afd080fc-c550-4fd2-b2d1-3d41774b55f9 (Parameters=) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (Parameters=) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (Parameters=) in 
object.afd080fc-c550-4fd2-b2d1-3d41774b55f9 (Parameters=) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (Parameters=) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (Parameters=) in 
object.afd080fc-c550-4fd2-b2d1-3d41774b55f9 (Parameters=) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (Parameters=) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (Parameters=) in 
object.afd080fc-c550-4fd2-b2d1-3d41774b55f9 (Parameters=) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (Parameters=) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (Parameters=) in 
object.afd080fc-c550-4fd2-b2d1-3d41774b55f9 (Parameters=) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (Parameters=) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.Page>.OnLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (Parameters=) in 
object.afd080fc-c550-4fd2-b2d1-3d41774b55f9 (Parameters=) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (Parameters=) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.Page>.UpdateLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.Platform.OnLayout (Parameters=) in 
Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (Parameters=) in 
Android.Views.ViewGroup.n_OnLayout_ZIIII (Parameters=) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.ViewGroup.cs:3275
object.5b7c3e10-d181-4843-826c-0219e72913aa (Parameters=) in
Comment 5 Dan Vanderboom 2014-10-14 11:49:45 UTC
The previous error information is displayed in the call stack window.

I pressed the Play button to see what would happen after that, if anything. I got this:

System.Diagnostics.Debugger.Mono_UnhandledException_internal () in 
System.Diagnostics.Debugger.Mono_UnhandledException (ex={Xamarin.Forms.Xaml.XamlParseException: Type AppStyle not found in xmlns 
  at Xamarin.Forms.Xaml.XamlLoader.GetElementType (System.String namespaceURI, System.String elementName, IList`1 typeArguments, IXmlLineInfo xmlInfo) [0x00000] in <filename unknown>:0 
  at (wrapper delegate-invoke) <Module>:invoke_Type_string_string_IList`1<Type>_IXmlLineInfo (string,string,System.Collections.Generic.IList`1<System.Type>,System.Xml.IXmlLineInfo)
  at Xamarin.Forms.Xaml.XamlTypeResolver.Resolve (System.String qualifiedTypeName) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.Xaml.StaticExtension.ProvideValue (IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.Xaml.MarkupExtensionParser.Parse (System.String match, System.String& remaining, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.Xaml.MarkupExpressionParser.ParseExpression (System.String& expression, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.Xaml.MarkupNode.ParseMarkup () [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.Xaml.MarkupNode.<.ctor>b__0 () [0x00000] in <filename unknown>:0 
  at System.Lazy`1[System.Object].InitValue () [0x00000] in <filename unknown>:0 }) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0xffffffff87500035, arg2=true, arg3=0, arg4=0, arg5=987, arg6=535) in 
object.4d99a907-9944-4b35-9d9f-2e8f6f7e0ec0 (arg0=0x415f3050, arg1=0x7b100039, arg2=0, arg3=0x0, arg4=0xffffffffb010003d) in 
Android.Runtime.JNIEnv.CallVoidMethod (jobject=0x1d200a96, jmethod=0x6d6a5c50, parms={Android.Runtime.JValue[4]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:504
Android.Views.ViewGroup.Layout (l=0, t=0, r=987, b=535) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.ViewGroup.cs:3047
Xamarin.Forms.Platform.Android.ViewRenderer<Xamarin.Forms.ListView,Android.Widget.ListView>.OnLayout (changed=true, l=0, t=0, r=987, b=535) in 
Xamarin.Forms.Platform.Android.ListViewRenderer.OnLayout (changed=true, l=0, t=0, r=987, b=535) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0xffffffff87500035, p0=true, p1=0, p2=0, p3=987, p4=535) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0xffffffff87500035, arg2=true, arg3=0, arg4=0, arg5=987, arg6=535) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (jobject=0x1d300a92, jclass=0x1d300476, jmethod=0x6d954b20, parms={Android.Runtime.JValue[6]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (p0=1073742811, p1=1073742359, p2=0, p3=0, p4=987, p5=535) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.ListView>.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (changed=true, l=0, t=80, r=987, b=615) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0xffffffff81e00031, p0=true, p1=0, p2=80, p3=987, p4=615) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0xffffffff81e00031, arg2=true, arg3=0, arg4=80, arg5=987, arg6=615) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (jobject=0x1d400a8e, jclass=0x1d300476, jmethod=0x6d954b20, parms={Android.Runtime.JValue[6]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (p0=1073742811, p1=1073742359, p2=0, p3=80, p4=987, p5=615) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (changed=true, l=0, t=0, r=987, b=682) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0x7dd0002d, p0=true, p1=0, p2=0, p3=987, p4=682) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0x7dd0002d, arg2=true, arg3=0, arg4=0, arg5=987, arg6=682) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (jobject=0x1d300a72, jclass=0x1d300476, jmethod=0x6d954b20, parms={Android.Runtime.JValue[6]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (p0=1073742811, p1=1073742506, p2=0, p3=0, p4=987, p5=682) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (changed=true, l=293, t=0, r=1280, b=682) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0xffffffffff600029, p0=true, p1=293, p2=0, p3=1280, p4=682) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0xffffffffff600029, arg2=true, arg3=293, arg4=0, arg5=1280, arg6=682) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (jobject=0x1d300a6e, jclass=0x1d300476, jmethod=0x6d954b20, parms={Android.Runtime.JValue[6]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (p0=1073742811, p1=1073742506, p2=293, p3=0, p4=1280, p5=682) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (changed=false, l=0, t=85, r=1280, b=767) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0xffffffffbfa00025, p0=false, p1=0, p2=85, p3=1280, p4=767) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0xffffffffbfa00025, arg2=false, arg3=0, arg4=85, arg5=1280, arg6=767) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (jobject=0x1d400646, jclass=0x1d300476, jmethod=0x6d954b20, parms={Android.Runtime.JValue[6]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (p0=1073743104, p1=1073742506, p2=0, p3=85, p4=1280, p5=767) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (changed=false, l=0, t=0, r=1280, b=767) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0xfffffffffec00021, p0=false, p1=0, p2=0, p3=1280, p4=767) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0xfffffffffec00021, arg2=false, arg3=0, arg4=0, arg5=1280, arg6=767) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (jobject=0x1d40047a, jclass=0x1d300476, jmethod=0x6d954b20, parms={Android.Runtime.JValue[6]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (p0=1073743104, p1=1073742591, p2=0, p3=0, p4=1280, p5=767) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.Page>.OnLayout (changed=false, l=0, t=0, r=1280, b=767) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0xffffffffa320001d, p0=false, p1=0, p2=0, p3=1280, p4=767) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0xffffffffa320001d, arg2=false, arg3=0, arg4=0, arg5=1280, arg6=767) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (jobject=0x1d40046e, jclass=0x1d300476, jmethod=0x6d954b20, parms={Android.Runtime.JValue[6]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (p0=1073743104, p1=1073742591, p2=0, p3=0, p4=1280, p5=767) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.Page>.UpdateLayout () in 
Xamarin.Forms.Platform.Android.Platform.OnLayout (changed=false, l=0, t=0, r=1280, b=767) in 
Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (changed=false, l=0, t=0, r=1280, b=767) in 
Android.Views.ViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0x5a100019, changed=false, l=0, t=0, r=1280, b=767) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.ViewGroup.cs:3275
object.fe07df0e-04bf-4fac-8e0e-157b77460454 (arg0=0x415f3050, arg1=0x5a100019, arg2=false, arg3=0, arg4=0, arg5=1280, arg6=767) in 

Buried in this second error message is information about some XAML parsing error.

So the problem after all isn't that the IsVisible property sometimes doesn't work, but rather that the XAML parser does a poor job of providing good error information up-front, and a poor job sometimes of pointing to the actual source of the error.,

In this scenario, I could have saved myself over a full day of troubleshooting if it had just told me that I have an error in my XAML file, which one and where...
Comment 6 Dan Vanderboom 2014-10-14 13:39:23 UTC
The previous error information is displayed in the call stack window.

I pressed the Play button to see what would happen after that, if anything. I got this:

System.Diagnostics.Debugger.Mono_UnhandledException_internal () in 
System.Diagnostics.Debugger.Mono_UnhandledException (ex={Xamarin.Forms.Xaml.XamlParseException: Type AppStyle not found in xmlns 
  at Xamarin.Forms.Xaml.XamlLoader.GetElementType (System.String namespaceURI, System.String elementName, IList`1 typeArguments, IXmlLineInfo xmlInfo) [0x00000] in <filename unknown>:0 
  at (wrapper delegate-invoke) <Module>:invoke_Type_string_string_IList`1<Type>_IXmlLineInfo (string,string,System.Collections.Generic.IList`1<System.Type>,System.Xml.IXmlLineInfo)
  at Xamarin.Forms.Xaml.XamlTypeResolver.Resolve (System.String qualifiedTypeName) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.Xaml.StaticExtension.ProvideValue (IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.Xaml.MarkupExtensionParser.Parse (System.String match, System.String& remaining, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.Xaml.MarkupExpressionParser.ParseExpression (System.String& expression, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.Xaml.MarkupNode.ParseMarkup () [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.Xaml.MarkupNode.<.ctor>b__0 () [0x00000] in <filename unknown>:0 
  at System.Lazy`1[System.Object].InitValue () [0x00000] in <filename unknown>:0 }) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0xffffffff87500035, arg2=true, arg3=0, arg4=0, arg5=987, arg6=535) in 
object.4d99a907-9944-4b35-9d9f-2e8f6f7e0ec0 (arg0=0x415f3050, arg1=0x7b100039, arg2=0, arg3=0x0, arg4=0xffffffffb010003d) in 
Android.Runtime.JNIEnv.CallVoidMethod (jobject=0x1d200a96, jmethod=0x6d6a5c50, parms={Android.Runtime.JValue[4]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:504
Android.Views.ViewGroup.Layout (l=0, t=0, r=987, b=535) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.ViewGroup.cs:3047
Xamarin.Forms.Platform.Android.ViewRenderer<Xamarin.Forms.ListView,Android.Widget.ListView>.OnLayout (changed=true, l=0, t=0, r=987, b=535) in 
Xamarin.Forms.Platform.Android.ListViewRenderer.OnLayout (changed=true, l=0, t=0, r=987, b=535) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0xffffffff87500035, p0=true, p1=0, p2=0, p3=987, p4=535) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0xffffffff87500035, arg2=true, arg3=0, arg4=0, arg5=987, arg6=535) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (jobject=0x1d300a92, jclass=0x1d300476, jmethod=0x6d954b20, parms={Android.Runtime.JValue[6]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (p0=1073742811, p1=1073742359, p2=0, p3=0, p4=987, p5=535) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.ListView>.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (changed=true, l=0, t=80, r=987, b=615) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0xffffffff81e00031, p0=true, p1=0, p2=80, p3=987, p4=615) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0xffffffff81e00031, arg2=true, arg3=0, arg4=80, arg5=987, arg6=615) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (jobject=0x1d400a8e, jclass=0x1d300476, jmethod=0x6d954b20, parms={Android.Runtime.JValue[6]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (p0=1073742811, p1=1073742359, p2=0, p3=80, p4=987, p5=615) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (changed=true, l=0, t=0, r=987, b=682) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0x7dd0002d, p0=true, p1=0, p2=0, p3=987, p4=682) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0x7dd0002d, arg2=true, arg3=0, arg4=0, arg5=987, arg6=682) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (jobject=0x1d300a72, jclass=0x1d300476, jmethod=0x6d954b20, parms={Android.Runtime.JValue[6]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (p0=1073742811, p1=1073742506, p2=0, p3=0, p4=987, p5=682) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (changed=true, l=293, t=0, r=1280, b=682) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0xffffffffff600029, p0=true, p1=293, p2=0, p3=1280, p4=682) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0xffffffffff600029, arg2=true, arg3=293, arg4=0, arg5=1280, arg6=682) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (jobject=0x1d300a6e, jclass=0x1d300476, jmethod=0x6d954b20, parms={Android.Runtime.JValue[6]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (p0=1073742811, p1=1073742506, p2=293, p3=0, p4=1280, p5=682) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (changed=false, l=0, t=85, r=1280, b=767) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0xffffffffbfa00025, p0=false, p1=0, p2=85, p3=1280, p4=767) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0xffffffffbfa00025, arg2=false, arg3=0, arg4=85, arg5=1280, arg6=767) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (jobject=0x1d400646, jclass=0x1d300476, jmethod=0x6d954b20, parms={Android.Runtime.JValue[6]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (p0=1073743104, p1=1073742506, p2=0, p3=85, p4=1280, p5=767) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.OnLayout (changed=false, l=0, t=0, r=1280, b=767) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0xfffffffffec00021, p0=false, p1=0, p2=0, p3=1280, p4=767) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0xfffffffffec00021, arg2=false, arg3=0, arg4=0, arg5=1280, arg6=767) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (jobject=0x1d40047a, jclass=0x1d300476, jmethod=0x6d954b20, parms={Android.Runtime.JValue[6]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (p0=1073743104, p1=1073742591, p2=0, p3=0, p4=1280, p5=767) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.Page>.OnLayout (changed=false, l=0, t=0, r=1280, b=767) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0xffffffffa320001d, p0=false, p1=0, p2=0, p3=1280, p4=767) in 
object.27bc65bb-8c72-42a7-bc64-f55a90bba972 (arg0=0x415f3050, arg1=0xffffffffa320001d, arg2=false, arg3=0, arg4=0, arg5=1280, arg6=767) in 
Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (jobject=0x1d40046e, jclass=0x1d300476, jmethod=0x6d954b20, parms={Android.Runtime.JValue[6]}) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:892
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout (p0=1073743104, p1=1073742591, p2=0, p3=0, p4=1280, p5=767) in 
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout () in 
Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.Page>.UpdateLayout () in 
Xamarin.Forms.Platform.Android.Platform.OnLayout (changed=false, l=0, t=0, r=1280, b=767) in 
Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (changed=false, l=0, t=0, r=1280, b=767) in 
Android.Views.ViewGroup.n_OnLayout_ZIIII (jnienv=0x415f3050, native__this=0x5a100019, changed=false, l=0, t=0, r=1280, b=767) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/3b7ef0a7/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.ViewGroup.cs:3275
object.fe07df0e-04bf-4fac-8e0e-157b77460454 (arg0=0x415f3050, arg1=0x5a100019, arg2=false, arg3=0, arg4=0, arg5=1280, arg6=767) in 

Buried in this second error message is information about some XAML parsing error.

So the problem after all isn't that the IsVisible property sometimes doesn't work, but rather that the XAML parser does a poor job of providing good error information up-front, and a poor job sometimes of pointing to the actual source of the error.,

In this scenario, I could have saved myself over a full day of troubleshooting if it had just told me that I have an error in my XAML file, which one and where...
Comment 7 Jason Smith [MSFT] 2016-03-18 08:37:05 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we no longer believe it affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
 
For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team