Solving Circular Navigation in Silverlight for Window Phone
hamishwillee
(Talk | contribs) m (Hamishwillee - Bot update - Fix metadata) |
hamishwillee
(Talk | contribs) m (Hamishwillee - Subedit) |
||
| Line 1: | Line 1: | ||
| − | [[Category:Windows Phone]][[Category:Silverlight]][[Category:Tutorial]] | + | [[Category:Windows Phone]][[Category:Silverlight]][[Category:Tutorial]][[Category:Code Examples]][[Category:UI]] |
| − | {{Abstract|This article explains | + | {{Abstract|This article explains the Windows Silverlight app "circular navigation problem", and introduces the [http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/12/13/solving-circular-navigation-in-windows-phone-silverlight-applications.aspx NonLinear Navigation Services] library which can be used to overcome it. }} |
{{ArticleMetaData <!-- v1.2 --> | {{ArticleMetaData <!-- v1.2 --> | ||
| Line 26: | Line 26: | ||
== Introduction == | == Introduction == | ||
| − | In the | + | In the "standard" Windows Phone Silverlight application model, users move linearly "forward" though pages and can then use the back button to "unwind" back through previously visited pages, and finally to exit. Windows Phone keeps track of the page "back-stack", making 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 [http://www.windowsphone.com/id-id/store/app/petualangan-aksara-di-tanah-jawa/a7b95aaa-221d-4684-ac5e-06a1cd016523 Petualangan Aksara di Tanah Jawa] below: | |
| + | [[File:CircularNavigationIllustrat.jpg|none]] | ||
| − | + | 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 [http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/12/13/solving-circular-navigation-in-windows-phone-silverlight-applications.aspx NonLinear Navigation Services]<ref>Kiriaty, Yochay. 2010. [http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/12/13/solving-circular-navigation-in-windows-phone-silverlight-applications.aspx Solving Circular Navigation in Windows Phone Silverlight Applications].</ref> library developed by [http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/12/13/windows-phone-recipes-helping-the-community.aspx 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: | ||
# Download [[File:NonLinear-WP-SLApp-Navigation-Service.zip]] | # Download [[File:NonLinear-WP-SLApp-Navigation-Service.zip]] | ||
# Add '''NonLinearNavigationServices''' project in the '''Solution''' which has been created. | # Add '''NonLinearNavigationServices''' project in the '''Solution''' which has been created. | ||
| − | # Initialize the service at the end of class constructor whose class is the inheritance of {{Icode|Application}} class.<code csharp>NonLinearNavigationService.Instance.Initialize (RootFrame);</code> | + | # Initialize the service at the end of class constructor whose class is the inheritance of {{Icode|Application}} class.<code csharp>NonLinearNavigationService.Instance.Initialize(RootFrame);</code> |
== Summary == | == Summary == | ||
| − | With NonLinear Navigation Services, | + | 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! | Good luck! | ||
== Reference == | == Reference == | ||
| − | + | <references/> | |
<!-- Translation --> [[en:Mengatasi Circular Navigation pada Silverlight for Window Phone]] | <!-- Translation --> [[en:Mengatasi Circular Navigation pada Silverlight for Window Phone]] | ||
| − | |||
Revision as of 04:19, 2 October 2012
This article explains the Windows Silverlight app "circular navigation problem", and introduces the NonLinear Navigation Services library which can be used to overcome it.
Article Metadata
Tested with
Compatibility
Article
Contents |
Introduction
In the "standard" Windows Phone Silverlight application model, users move linearly "forward" though pages and can then use the back button to "unwind" back through previously visited pages, and finally to exit. Windows Phone keeps track of the page "back-stack", making 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:
- Download File:NonLinear-WP-SLApp-Navigation-Service.zip
- Add NonLinearNavigationServices project in the Solution which has been created.
- 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, 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!
Reference
- ↑ Kiriaty, Yochay. 2010. Solving Circular Navigation in Windows Phone Silverlight Applications.


