I am using navigation services in WPF. For navigating to page I use:
this.NavigationService.Navigate(new MyPage());
For going back I use:>
Here's a potential solution, however there may be a 'best practice' method that i'm not currently aware of:
while(this.NavigationService.CanGoBack)
{
this.NavigationService.GoBack();
}
CanGoBack returns true if there are entries in the back navigation history and as such GoBack() will be executed until it returns false. In theory this should get you back to the origin, or in other words the first page.