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 ?
To reset the navigation stack for the home screen with React Navigation and React Native, we can use the navigation. dispatch and the CommonActions. reset methods. import { CommonActions } from "@react-navigation/native"; navigation.
In the latest version of Xamarin.Forms you can see your navigation stack using
Navigation.NavigationStack
therefore you could use a
var existingPages = Navigation.NavigationStack.ToList(); foreach(var page in existingPages) { Navigation.RemovePage(page); }
This code would have to go into your code behind of a Navigation Page or something that implements INavigation.
More information Xamarin.Forms.INavigation Members
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With