Navigating Pages in Managed Code Applications

Windows Media Center applications can use the PageSession and HistoryOrientedPageSession classes to manage navigating through pages.

The PageSession class allows you to work with one page. If you need a page stack, use the HistoryOrientedPageSession class, which is derived from PageSession and implements an internal page stack for tracking page navigation. Using HistoryOrientedPageSession allows you to place pages from your application on a stack that can then be navigated back to by pressing the Back button on a Windows Media Center remote control or the BACKSPACE key on the keyboard. Windows Media Center manages this stack of pages for your application automatically as long as you use the HistoryOrientedPageSession object in your application.

Using the HistoryOrientedPageSession object provides users of your application with an easy way to drill into detailed views (such as plot summaries and artist information) and then return to the previous page. If you instead use PageSession, if a user presses the Back button at any point while using your application, they will be returned back to the point that they launched your application from within Windows Media Center (such as the Extras Library).

Sample Explorer

  • Page Navigation > Navigate and NavigateCommand
  • Page Navigation > HistoryOrientedPageSession

See Also