After navigation has occurred, an opportunity remains for the previous page to interact with the current page from the previous page’s OnNavigatedFrom
method. This is achieved using the Content
property of the NavigationEventArgs
, which provides the destination PhoneApplicationPage
object.
To see this in action, place a breakpoint in the OnNavigatedFrom
method. When the breakpoint is hit, notice that the page being navigated to has already been instantiated and is provided in the Content
property of the NavigationEventArgs
(see Figure 3.8).
The Uri
property of the NavigationEventArgs
contains the URI of the destination page, including any query string that may be present.
Note
If navigating to an external URI, or when the app is being deactivated, the Uri
property of the OnNavigatedFrom
method’s NavigationEventArgs
is equal to app://external/.
3.144.227.9