Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WP7: navigate twice back

is there a way to navigate two pages back in Windows Phone 7? I know the URI, but I'd like to clear the navigation stack.

like image 933
Seva Alekseyev Avatar asked Apr 11 '11 22:04

Seva Alekseyev


2 Answers

Yes you can programmatically walk back the stack. I would recommend reading this guidance doc on this topic:

http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/12/13/solving-circular-navigation-in-windows-phone-silverlight-applications.aspx

Thanks, Stefan Wick - Microsoft Silverlight

like image 172
Stefan Wick MSFT Avatar answered Sep 24 '22 04:09

Stefan Wick MSFT


The easiest way to do this is like this:

NavigationService.RemoveBackEntry();
NavigationService.GoBack();

This doesn't exactly go back twice, it removes the previous page from the navigation stack, then goes back once, but the effect is the same.

like image 34
Nathan Avatar answered Sep 20 '22 04:09

Nathan