summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authoradrianknight89 <adrianknight89@outlook.com>2017-03-14 06:57:32 -0500
committerRui Marinho <me@ruimarinho.net>2017-03-14 11:57:32 +0000
commit9fb7101760535cf108441ab5ff13fe6951cf259e (patch)
tree3f541b60e3b872801e9b1d6a1102a2db2ae39eee /Xamarin.Forms.Controls.Issues
parent83fd2751e6939eb76a4ecd8b098144afaa2d289f (diff)
downloadxamarin-forms-9fb7101760535cf108441ab5ff13fe6951cf259e.tar.gz
xamarin-forms-9fb7101760535cf108441ab5ff13fe6951cf259e.tar.bz2
xamarin-forms-9fb7101760535cf108441ab5ff13fe6951cf259e.zip
Fix MasterDetailPage event cycle (#754)
sample code add tag change message changes changes 2 changes 3 changes 4
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla52318.cs55
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems1
2 files changed, 56 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla52318.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla52318.cs
new file mode 100644
index 00000000..8d86565c
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla52318.cs
@@ -0,0 +1,55 @@
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 52318, "OnAppearing/Disappearing triggers for all pages in navigationstack backgrounding/foregrounding app", PlatformAffected.Android)]
+ public class Bugzilla52318 : TestMasterDetailPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init()
+ {
+ Master = new ContentPage { Title = "Master page", Content = new Label { Text = "Master page" } };
+ Detail = new NavigationPage(new ContentPage52318());
+ }
+ }
+
+ [Preserve(AllMembers = true)]
+ public class ContentPage52318 : ContentPage
+ {
+ public ContentPage52318()
+ {
+ var stackLayout = new StackLayout();
+ var label = new Label
+ {
+ Text = "Tap on the Navigate button as many times as you like to add to the navigation stack. An alert should be visible on page appearing. Hit the Home button and come back. Only the last page should alert."
+ };
+ stackLayout.Children.Add(label);
+
+ var button = new Button
+ {
+ Text = "Navigate to a new page",
+ Command = new Command(async () =>
+ {
+ await Navigation.PushAsync(new ContentPage52318());
+ })
+ };
+ stackLayout.Children.Add(button);
+
+ Content = stackLayout;
+ }
+
+ protected override void OnAppearing()
+ {
+ int count = (Parent as NavigationPage).Navigation.NavigationStack.Count;
+ Title = $"Page: {count}";
+ DisplayAlert("", Title + " appearing.", "OK");
+ base.OnAppearing();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
index 83a5995b..ef469ec0 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
@@ -173,6 +173,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla47923.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla48236.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla47971.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla52318.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla37290.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla51553.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla51802.cs" />