please, can you tell me how to use Frame.Navigate(typeof(MainPage));
to go to the main Page from any Page closing all pages in stack?
I tried to use this code:
for (int i = 0; i < Frame.BackStack.Count; i++)
{
Frame.BackStack.RemoveAt(i);
}
Frame.Navigate(typeof(HomePage));
But doesn't work, because when I press the back key button the pages however open.
Thanks very much!
如果您只想使整个后背堆栈消失,请使用
Frame.BackStack.Clear();
First navigate to MainPage then clear the backstack
Frame.Navigate(typeof(MainPage));
Frame.BackStack.Clear();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.