summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32842.xaml.cs
blob: a4bab73f611eef4a9671ad77ad844233a3613e57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Collections.Generic;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;

namespace Xamarin.Forms.Controls.Issues
{
#if APP
	[Preserve(AllMembers = true)]
	[Issue(IssueTracker.Bugzilla, 32842,
	"[WinRT] ItemSelected Not Ignored When a ListView Item Contains a TapGestureRecognizer", PlatformAffected.WinRT)]
	public partial class Bugzilla32842 : ContentPage
	{
		public Bugzilla32842 ()
		{
			
			List<string> items = new List<string> { "item1", "item2", "item3" };
		
			InitializeComponent ();
		
			MainList.ItemsSource = items;
			MainList.ItemSelected += MainListSelectionChanged;
		}

		int _boxTaps;
		int _listSelections;

		void MainListSelectionChanged(object sender, SelectedItemChangedEventArgs e)
		{
			if (e.SelectedItem == null) {
				return;
			}

			_listSelections += 1;

			ListResults.Text = $"Selections = {_listSelections}";
		}

		void BoxTapped(object sender, EventArgs args)
		{
			_boxTaps += 1;

			BoxResults.Text = $"Box Taps = {_boxTaps}";
		}
	}
#endif
}