What is the difference between the NavigationService.Navigate () method and the PhoneApplicationFrame.Source property?

Adapted from Exercise 1: Creating Windows Phone Applications with Microsoft Visual Studio 2010 Express for Windows Phone

Task 3: Step 9

// navigate
this.NavigationService.Navigate(new Uri("/PuzzlePage.xaml", UriKind.Relative));

Note:
The PhoneApplicationPage class provides methods and properties for navigating to pages through its NavigationService property. You can call the navigation method in the NavigationService and pass the URI for the page as a parameter. You can also use the GoBack and GoForward methods to move back or forward in the navigation history. The hardware return button also provides reverse navigation in the application. The event handler shown above uses the NavigationService to go to the PuzzlePage.xaml page.

Task 4: Step 3

(RootVisual as Microsoft.Phone.Controls.PhoneApplicationFrame).Source = 
    new Uri("/ErrorPage.xaml", UriKind.Relative);

Note:
...
Whenever you set the Source property to a value other than the displayed content, the frame jumps to the new content.
...

What are the differences and similarities of both methods?

+5
1

, .

NavigationService.Navigate - Silverlight, xaml ( ) - .

, NavigationService . Source PhoneApplicationFrame .

, , , , , .

NavigationService , Silverlight, PhoneApplicationFrame.Source WP.

+6

All Articles