I would like to create a PhoneApplicationPage dynamically and navigate to that page. Is this possible?
Edit: I am developing a number of applications which will share a couple of pages. I want to avoid code duplication and create them in code once and share them across these applications.
I certainly do not want to bypass the built in page navigation by using custom content or any other means. I was hoping that I could programatically create the pages, register or inject them into the navigation system and use them the same way as if they were created at design time.
The navigation system supports loading pages created in libraries (in fact, it’s often used to improve startup speeds by moving large, uncommonly used pages out of the main assembly).
Assuming you have created a Windows Phone Library project named
CommonPagesthat incldes a pageCommon.xaml, you can navigate to it using the URI/CommonPages;component/Common.xamlRemember to add a reference to your library from your main project.