PhoneApplicationPage extends the
System.Windows.Controls.Page class, which has a number of virtual methods called when the page is brought into view or removed from view by the
PhoneApplicationFrame (see Figure 3.7).
OnNavigatingFrom method is called before a page is removed from view by the
PhoneApplicationFrame, and the
OnNavigatedFrom method is called after navigation occurs. Conversely, the
OnNavigatedTo method is called when the frame brings the page into view.