Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Solving Circular Navigation in Silverlight for Window Phone

From Wiki
Jump to: navigation, search

This article explains the Windows Silverlight app "circular navigation problem", and introduces the NonLinear Navigation Services library which can be used to overcome it.

WP Metro Icon UI.png
SignpostIcon XAML 40.png
SignpostIcon WP7 70px.png
Article Metadata
Tested with
Devices(s): Nokia Lumia 710
Platform(s): Windows Phone 7.5
Windows Phone 7.5
Dependencies: NonLinear Navigation Services
Keywords: Circular Navigation, Silverlight for Windows Phone, NonLinear Navigation Services
By Jeffrey.Halimsetiawan
Last edited: hamishwillee (02 Jul 2013)



In the "standard" Windows Phone Silverlight application model, users move linearly "forward" through pages and can then use the "back" button to retract through previously visited pages, and finally to exit. Windows Phone navigation history maintains a "last-in, first-out" structure called "back-stack". This provision makes it easy to implement a linear path forward and back through navigated pages.

However it is possible to directly navigate to an arbitrary URI from any page, and this can result in navigation to a URI that is already in the back-stack, creating a loop. This can result in confusing navigation for the end user. Consider for example, if the user can navigates to "Home" rather than unwinding the page stack as shown in the game Petualangan Aksara di Tanah Jawa below:


Users expect to exit the game when they press the back button from the home page, but because of the loop they will be taken back to a previously navigated "stage" page.

One solution to overcome this problem is to use a NonLinear Navigation Services[1] library developed by Windows Phone Recipes. This library automatically unwinds any loops if it detects that you're navigating to a page that is already in the back stack.

Using the library

The steps for using this library are straightforward:

  1. Download
  2. Add NonLinearNavigationServices project in the Solution which has been created.
  3. Initialize the service at the end of class constructor whose class is the inheritance of Application class.


With NonLinear Navigation Services, developers can more easily develop applications because they do not need to waste a lot of time thinking about the navigation management of the application.

Good luck!


  1. Kiriaty, Yochay. 2010. Solving Circular Navigation in Windows Phone Silverlight Applications.
This page was last modified on 2 July 2013, at 11:10.
59 page views in the last 30 days.