summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla40998.cs
blob: 28288a43b74a6cb8a51f6f7ded11794c7d4a955a (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
using System;

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, 40998, "[UWP] Pressing escape with an awaited DisplayActionSheet doesn't return a result", PlatformAffected.WinRT)]
	public class Bugzilla40998 : TestContentPage
	{
		protected override void Init()
		{
			var resultLabel = new Label
			{
				Text = "ActionSheet Result - use the ActionSheet to show the result"
			};
			Content = new StackLayout
			{
				Children =
				{
					resultLabel,
					new Button
					{
						Text = "Click to display ActionSheet",
						Command = new Command(async () =>
						{
							var result = await DisplayActionSheet("Test ActionSheet", "Cancel", "Destroy", new string[] { "Test Button" });
							resultLabel.Text = result;
						})
					}
				}
			};
		}
	}
}