summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36009.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36009.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36009.cs56
1 files changed, 56 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36009.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36009.cs
new file mode 100644
index 00000000..0e0e470d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36009.cs
@@ -0,0 +1,56 @@
+´╗┐using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 36009, "Children of Layouts with data bound IsVisible are not displayed")]
+ public class Bugzilla36009 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ [Preserve (AllMembers = true)]
+ public class SampleViewModel: ViewModelBase
+ {
+ public bool IsContentVisible {
+ get{ return GetProperty<bool> (); }
+ set{ SetProperty (value); }
+ }
+ }
+
+ protected override void Init ()
+ {
+ var boxview = new BoxView{ BackgroundColor = Color.Aqua, AutomationId = "Victory" };
+
+ var contentView = new ContentView {
+ Content = boxview
+ };
+
+ contentView.SetBinding (IsVisibleProperty, Binding.Create<SampleViewModel> (t => t.IsContentVisible));
+
+ var layout = new AbsoluteLayout {
+ Children = { contentView }
+ };
+
+ Content = layout;
+
+ var vm = new SampleViewModel ();
+
+ BindingContext = vm;
+
+ vm.IsContentVisible = true;
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla36009Test ()
+ {
+ RunningApp.WaitForElement(q => q.Marked("Victory"));
+ }
+#endif
+ }
+}