Forum Cross Platform with Xamarin
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.

Open start form and close all other Forms

At the start of my project I open a Dashboard form, each time I am calling other forms with the Navigation.PushAsync. But when the User logs out I want to close all forms and stacks and open my Dashboard again without going back option. How do i do this?


  • seanydaseanyda GBMember ✭✭✭✭✭

    You would need to clear the NavigationStack to go back to the original page.

    var navigationPages = Navigation.NavigationStack.ToList();
    foreach(var page in navigationPages)

    Use System.Linq Where to filter out exactly what you want to remove.

  • FaithFaithFaithFaith USMember ✭✭

    Hi seanyda, so do I push the Dashboard page after this?

Sign In or Register to comment.