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

using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
#endif

namespace Xamarin.Forms.Controls
{
	[Preserve (AllMembers = true)]
	[Issue (IssueTracker.Bugzilla, 28240, "Problems with a NavigationPage as Master+Detail of a MasterDetailPage", PlatformAffected.Android)]
	public class Bugzilla28240 : TestMasterDetailPage
	{
		protected override void Init ()
		{
			Detail = new NavigationPage( new ContentPage { Title = "DetailPage", BackgroundColor = Color.Red });
			Master = new NavigationPage( new ContentPage { Title = "MasterPage", BackgroundColor = Color.Blue }) { Title =" Master" };
		}

		protected override async void OnAppearing ()
		{
			var btn = new Button () { Text = "GO Back" };
			btn.Clicked+= async (object sender, EventArgs e) => await (Master as NavigationPage).PopAsync ();

			await (Master as NavigationPage).PushAsync (new ContentPage { Title = "New MasterPage", Content = btn , BackgroundColor = Color.Pink  });
			base.OnAppearing ();
		}
#if UITEST
		[Test]
		public void Bugzilla28240Test ()
		{

		}
#endif
	}
}