summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml.cs48
1 files changed, 48 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml.cs
new file mode 100644
index 00000000..98012901
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml.cs
@@ -0,0 +1,48 @@
+´╗┐using System;
+using System.Collections.ObjectModel;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 38416, "ListView Sized Incorrectly After Containing Layout's Visibility is Toggled")]
+ public partial class Bugzilla38416 : TestContentPage
+ {
+ [Preserve (AllMembers = true)]
+ public class ListItem
+ {
+ public string Name { get; set; }
+ }
+
+#if !UITEST
+ void SwapVisibilityClicked(object sender, EventArgs e)
+ {
+ Box.IsVisible = !Box.IsVisible;
+ FirstLayout.IsVisible = !FirstLayout.IsVisible;
+ //FirstListView.IsVisible = !FirstListView.IsVisible; //Workaround. Has to be called after the layout's visibility
+ }
+#endif
+
+ protected override void Init ()
+ {
+#if !UITEST
+ InitializeComponent();
+
+ var items = new ObservableCollection<ListItem>();
+ FirstListView.ItemsSource = items;
+
+ for(int i=0; i<70; i++)
+ {
+ items.Add(new ListItem { Name = string.Format("List Item {0}", i+1) });
+ }
+
+ Box.IsVisible = true;
+ //FirstListView.IsVisible = false; //Workaround
+ FirstLayout.IsVisible = false;
+#endif
+ }
+
+ }
+}