Question

I am using Xamarin.Forms and trying to implement an app with Navigation. I Created a Xamarin.Forms shared project solution and added my first two pages. They work correctly and so does the navigation. I added another page and linked them up the same way as the first two and it does not work. I click the button to navigate to the view and nothing happens.

I wire up both of the views like such

btnPurchase.Clicked += (s, e) => this.Navigation.PushAsync(new PurchasePage());
btnContactUs.Clicked += (s, e) => this.Navigation.PushAsync(new ContactUsPage());

After wiring up the click event I add both buttons as children in my stacklayout.

Both buttons show up in the view. However, the btnContactUs button is the only one that gets pushed onto the navigation stack.

Any ideas?

Was it helpful?

Solution

I figured it out.

I had changed the Name of my SharedProject in which it removed the reference from my iOS and Android project. Surprisingly I did not receive any reference errors until I did a clean / rebuild. Once I hooked up the shared project again, the navigation worked correctly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top