blob: 4c72adeb3fe9d490b72bb62dce263ff7d21ddfd6 (
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
54
55
56
57
58
59
|
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, 38105, "RemovePage does not cause back arrow to go away on Android",
NavigationBehavior.PushModalAsync)]
internal class Bugzilla38105 : TestMasterDetailPage
{
protected override void Init ()
{
Detail = new NavigationPage (new ViewA ());
var button = new Button () { Text = "Click me" };
button.Clicked += (o, e) => {
var navPage = (NavigationPage)Detail;
var rootPage = navPage.CurrentPage;
navPage.PopToRootAsync (false);
navPage.Navigation.PushAsync (new ViewB ());
navPage.Navigation.RemovePage (rootPage);
IsPresented = false;
};
Master = new ContentPage () {
Title = "test",
Content = button
};
}
public class ViewA : ContentPage
{
public ViewA ()
{
Title = "View A";
}
}
public class ViewB : ContentPage
{
public ViewB ()
{
Title = "View B";
}
}
}
}
|