summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31806.cs
diff options
context:
space:
mode:
authorPaul DiPietro <paul.dipietro@me.com>2016-05-26 15:14:56 -0400
committerkingces95 <kingces95@users.noreply.github.com>2016-05-26 12:14:56 -0700
commitb17cb55f5710cfc14a4dbfe0182e94df47d83bd3 (patch)
tree6a85c90a1f6ce7a0838c45394977070174ce4568 /Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31806.cs
parent349336dbf12fb158f7731ece7fb1524cb1f5808a (diff)
downloadxamarin-forms-b17cb55f5710cfc14a4dbfe0182e94df47d83bd3.tar.gz
xamarin-forms-b17cb55f5710cfc14a4dbfe0182e94df47d83bd3.tar.bz2
xamarin-forms-b17cb55f5710cfc14a4dbfe0182e94df47d83bd3.zip
[8.1/UWP] Fix PopToRootAsync functioning incorrectly (#185)
When using PopToRootAsync on 8.1/UWP, the stack was being cleared but the actual page was not being set due to a missing event handler on the NavigationPageRenderer.
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31806.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31806.cs55
1 files changed, 55 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31806.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31806.cs
new file mode 100644
index 00000000..60c68a03
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31806.cs
@@ -0,0 +1,55 @@
+using System;
+
+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, 31806, "[8.1/UWP] PopToRootAsync crashes due to not setting the current page correctly", PlatformAffected.WinRT)]
+ public class Bugzilla31806 : TestContentPage
+ {
+ protected override void Init()
+ {
+ Content = new StackLayout
+ {
+ Children =
+ {
+ new Button
+ {
+ Text = "Navigate to a new page",
+ Command = new Command(() =>
+ {
+ Navigation.PushAsync(new ContentPage
+ {
+ Content = new StackLayout
+ {
+ Children =
+ {
+ new Label
+ {
+ Text = "Pressing this button should let the navigation return to the repro list"
+ },
+ new Button
+ {
+ Text = "Call PopToRootAsync()",
+ Command = new Command(() =>
+ {
+ Navigation.PopToRootAsync();
+ })
+ }
+ }
+ }
+ });
+ })
+ }
+ }
+ };
+ }
+ }
+}