diff options
author | Jason Smith <jason.smith@xamarin.com> | 2016-03-22 13:02:25 -0700 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-03-22 16:13:41 -0700 |
commit | 17fdde66d94155fc62a034fa6658995bef6fd6e5 (patch) | |
tree | b5e5073a2a7b15cdbe826faa5c763e270a505729 /Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1644.cs | |
download | xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.gz xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.bz2 xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.zip |
Initial import
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1644.cs')
-rw-r--r-- | Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1644.cs | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1644.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1644.cs new file mode 100644 index 00000000..c8947782 --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1644.cs @@ -0,0 +1,74 @@ +using System; +using Xamarin.Forms; +using System.Collections.ObjectModel; + +using Xamarin.Forms.CustomAttributes; + +namespace Xamarin.Forms.Controls +{ + [Preserve (AllMembers=true)] + [Issue (IssueTracker.Github, 1644, "ListView reappearing and selecting its item causes jobject exception", PlatformAffected.Android)] + public class Issue1644 : ContentPage + { + public ObservableCollection<string> Collection = new + ObservableCollection<string>(); + + public Issue1644 () + { + for (int i = 0; i < 20; i++) + { + Collection.Add(DateTime.Now.ToString()); + } + + var listView = new ListView() { + HorizontalOptions = LayoutOptions.FillAndExpand, + HasUnevenRows = true, + ItemsSource = Collection, + }; + + listView.ItemSelected += (sender, e) => + { + listView.SelectedItem = null; + }; + + var root = new StackLayout() { + Padding = 5, + Spacing = 5, + HorizontalOptions = LayoutOptions.FillAndExpand, + VerticalOptions = LayoutOptions.FillAndExpand, + Children = { + listView + } + }; + + Content = root; + } + } + + public class Issue1644Menu : MasterDetailPage + { + Issue1644 _secondPage = new Issue1644(); + + public Issue1644Menu() + { + var button = new Button() { + Text = "MAIN MENU BUTTON" + }; + + button.Clicked += (sender, e) => + { + Navigation.PushAsync(_secondPage); + }; + + Master = new ContentPage() { + Title = "Master" + }; + + Detail = new ContentPage() { + Title = "Detail", + Content = button + }; + } + } +} + |