×
Namespaces

Variants
Actions
Revision as of 12:37, 28 September 2012 by Jeffrey.Halimsetiawan (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Solving Circular Navigation in Silverlight for Window Phone

From Nokia Developer Wiki
Jump to: navigation, search

This article explains how to resolve circular navigation problem that may occurs in the navigation between pages in Silverlight for Windows Phone.

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

Contents

Introduction

In the Silverlight for Windows Phone application model which is using several pages as its element, almost all applications consist of the various pages and the user has the right to navigate back. For each application, Windows Phone also keeps back-stack of pages which is a history of the pages that have been visited by the user. With such mechanism, developers are often faced with a situation where the application has a loop on page navigation.

Loop on the back-stack from the application navigation means there is duplication of the same page in the application back-stack. For example, the illustration can be seen in game Petualangan Aksara di Tanah Jawa below:
CircularNavigationIllustrat.jpg

Another example, when you create registration wizard, it requires a lot of inputs so it consists of several pages. If we use NavigationServices.Navigate() method to return to the MainPage then we will return to the GamePage when we press the 'Back' button. In fact, the expected response is out of the application.

The solution to overcome this problem is to use a NonLinear Navigation Services library developed by Windows Phone Recipes.

Procedure

The steps which must be done are quite easy, as follow:

  1. Download NonLinear Navigation Services
  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.
    NonLinearNavigationService.Instance.Initialize (RootFrame);

Summary

With NonLinear Navigation Services, developer will be easier to develop applications because they do not need to waste a lot of time thinking about the navigation management of the application.

Good luck!

Reference

Kiriaty, Yochay. 2010. Solving Circular Navigation in Windows Phone Silverlight Applications.

132 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×