summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27698.cs
blob: 08122826caef8eb09460ee983160f0893d7c6e14 (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
48
49
50
51
52
53
using System;

using Xamarin.Forms.CustomAttributes;

#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
#endif

namespace Xamarin.Forms.Controls
{
	[Issue (IssueTracker.Bugzilla, 27698, "[iOS] DisplayAlert and DisplayActionSheet are shown below master page ")]
	public class Bugzilla27698 : TestMasterDetailPage // or TestMasterDetailPage, etc ...
	{
		protected override void Init ()
		{

			var showAlertBtn = new Button { Text = "DisplayAlert" };
			var showActionSheetBtn = new Button { Text = "DisplayActionSheet" };

			var master = new ContentPage
			{
				Title = "Master",
				Content = new StackLayout
				{
					VerticalOptions = LayoutOptions.Center,
					Children = {
						showAlertBtn,
						showActionSheetBtn
					}
				}
			};

			Master = master;

			MasterBehavior = MasterBehavior.Popover;

			Detail = new ContentPage {
				Content = new Label { Text = "Details", HorizontalOptions =
					LayoutOptions.Center, VerticalOptions = LayoutOptions.Center
				}
			};

			showAlertBtn.Clicked += (s, e) => DisplayAlert("Title","Message", "Cancel");
			showActionSheetBtn.Clicked += (s, e) => DisplayActionSheet ("Title", "Cancel", null, "Button1", "Button2", "Button3");
			
		}

#if UITEST

#endif
	}
}