Cross-Page Communication
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).
Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.