The NavigationWindow, which is defined in the MainWindow.xaml page, provides the basic mechanism to support the content navigation. The Source attribute (Source="Page1.xaml"), defined as URI, asks NavigationWindow to load the mentioned page (Page1.xaml) by default.
When you click on the Next button of Page1, the NavigationService.Navigate method executes, passing the URI of the page that you want to load next. The navigation buttons automatically activate based on the history of the navigation that you performed.
In Page2, when you click on the Previous button, it first checks whether the NavigationService has an immediate history item to navigate you to a previous page. If it finds a previous page, it then automatically navigates you to the desired page by calling the NavigationService.GoBack() method call. In this case, you don't have to pass the URI of the page.