Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Opening a modal page inside another modal page causes strange behaviour on WinPhone

To reproduce:

  • Create a new Project and update nugets with latest xamarin.forms (4.0.3)
  • Let the MainPage be a ContentPage wrapped in a NavigationPage
  • From MainPage, push a new Content page (Page2) Modal (Navigation.PushModalAsync(new Page2()))
  • From Page2, push a new Content page (Page3) Modal (Navigation.PushModalAsync(new Page3()))
  • Now, on Page3, have a button to pop the topmost modal window (PopModalAsync())

This will work perfect on Android and iOS. However, on WinPhone (at least 8.1Silverlight) it will not.
On WinPhone, the first time pressing the pop-button on page3 have no effect. The second time BOTH page3 and page2 will be popped, landing on MainPage.

This was not the case in earlier versions of Xamarin.Forms. It was introduced in the latest version, 4.0.3 (or if it was the version before).

A way to get around it is wrapping page2 inside a NavigationPage (PushModalAsync(new NavigationPage(new Page2())), but this shouldn't be needed, should it?

Can anyone confirm if this is a bug or not? Is it known? Will it be fixed?

Regards Andreas

Sign In or Register to comment.