How do I clear the Navigation stack?

后端 未结 5 1239
无人共我
无人共我 2021-02-18 18:03

I have problem for Navigation in my app. I use xamarin.forms how can clean my navigation stack. No use Pop and push. Can I see my full navigation stack ?

5条回答
  •  暖寄归人
    2021-02-18 18:27

    You can access the navigation stack of your application by calling: Navigation.NavigationStack.

    In my opinion the best approach is to parse the navigation stack to a list and clear it:

    Navigation.NavigationStack.ToList().Clear();
    

提交回复
热议问题