summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authorPaul DiPietro <pauldipietro@users.noreply.github.com>2017-09-12 11:54:22 (GMT)
committerSamantha Houts <samantha.houts@xamarin.com>2017-09-15 16:42:56 (GMT)
commitd1bf93be200b3d3c48d0d292bf455f444485d8f9 (patch)
tree5342022dd2af22fe5a35a589c5332454437a940c /Xamarin.Forms.Controls.Issues
parent7c50652923422081342a61f971123c1529ecfedc (diff)
downloadxamarin-forms-d1bf93be200b3d3c48d0d292bf455f444485d8f9.zip
xamarin-forms-d1bf93be200b3d3c48d0d292bf455f444485d8f9.tar.gz
xamarin-forms-d1bf93be200b3d3c48d0d292bf455f444485d8f9.tar.bz2
[UWP] Use ItemClick to re-enable use of enter key for selection on ListView (#1133)
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla59248.cs57
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems1
2 files changed, 58 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla59248.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla59248.cs
new file mode 100644
index 0000000..96a8029
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla59248.cs
@@ -0,0 +1,57 @@
+´╗┐using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 59248, "[UWP] ItemTapped event is not fired when keyboard Enter Pressed on ListView", PlatformAffected.UWP)]
+ public class Bugzilla59248 : TestContentPage
+ {
+ protected override void Init()
+ {
+ var selectedItem = new Label { Text = "SelectedItem" };
+ var list = new ListView
+ {
+ ItemsSource = new string[] { "A", "B", "C" },
+ ItemTemplate = new DataTemplate(() =>
+ {
+ var view = new ViewCell();
+ view.View = new StackLayout
+ {
+ Children =
+ {
+ new Label { Text = "Label" },
+ new Button { Text = "Click for alert", Command = new Command(() => DisplayAlert("Clicked the button in the listview item", "Ok", "Cancel"))}
+ }
+ };
+ return view;
+ })
+ };
+ list.ItemTapped += List_ItemTapped;
+ list.ItemSelected += (s, e) =>
+ {
+ selectedItem.Text = list.SelectedItem == null ? "None" : list.SelectedItem.ToString();
+ };
+
+ Content = new StackLayout
+ {
+ Children =
+ {
+ list,
+ selectedItem
+ }
+ };
+ }
+
+ private void List_ItemTapped(object sender, ItemTappedEventArgs e)
+ {
+ if (e.Item != null)
+ DisplayAlert("Tapped: " + e.Item, "Ok", "Cancel");
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
index 07cea4f..6b128ca 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
@@ -216,6 +216,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla57758.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla57910.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla58406.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla59248.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ButtonBackgroundColorTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)CarouselAsync.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla34561.cs" />