-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Issue6663.cs
78 lines (63 loc) · 1.59 KB
/
Issue6663.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
#if UITEST
using NUnit.Framework;
using Xamarin.UITest;
using Xamarin.Forms.Core.UITests;
#endif
namespace Xamarin.Forms.Controls.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 6663, "Fix visibility of hidden pages in the stack", PlatformAffected.Gtk)]
#if UITEST
[NUnit.Framework.Category(UITestCategories.Navigation)]
#endif
public class Issue6663 : ContentPage
{
public Issue6663()
{
Title = "Issue 6663";
BackgroundColor = Color.Green;
var layout = new StackLayout();
var instructions = new Label
{
Text = "Press the button below to navigate to a new page. Navigate back and verify that the navigation bar is visible and the page is rendered correctly."
};
var navigateButton = new Button
{
Text = "Navigate"
};
navigateButton.Clicked += (sender, e) =>
{
Navigation.PushAsync(new Issue663SecondPage());
};
layout.Children.Add(instructions);
layout.Children.Add(navigateButton);
Content = layout;
}
}
internal class Issue663SecondPage : ContentPage
{
public Issue663SecondPage()
{
Title = "Issue 6663 SecondPage";
BackgroundColor = Color.Red;
var layout = new StackLayout();
var instructions = new Label
{
Text = "Press the button below to navigate back."
};
var navigateButton = new Button
{
Text = "Navigate Back"
};
navigateButton.Clicked += (sender, e) =>
{
Navigation.PopAsync();
};
layout.Children.Add(instructions);
layout.Children.Add(navigateButton);
Content = layout;
}
}
}