-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Bugzilla28240.cs
34 lines (30 loc) · 1.1 KB
/
Bugzilla28240.cs
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
using System;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
#endif
namespace Xamarin.Forms.Controls.Issues
{
#if UITEST
[Category(Core.UITests.UITestCategories.Bugzilla)]
#endif
[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();
}
}
}