Introduction
Welcome again! Today we will talk about Windows Phone page navigation. Previously in Windows Phone 7 and 8, the page navigation technique was quite different. In a Windows Phone 8 app, it could have several pages and when we want to navigate through various pages, it opens a new window. But in Windows Phone 8.1, there is only one window. When we want to open a different page, it opens a new frame. So things were changed a little from Windows 8.
So, let's see how it works in Windows Phone 8.1 page navigation. Let's get started.
Creating a New Project
Fist open up a new “Blank App (Windows Phone)” project. Then you've to delete the “MainPage.xaml”, because when we navigate among pages, we'll use the Basic Page template.
Figure 1
So, it's good to work with the “Basic Page” template. To add a new “Main Page”, just right-click on the project in Solution Explorer and select Add >> New Item.
Figure 2
Then, select the “Basic Page” template and give it an exact name “MainPage.xaml”.
Figure 3
We need another page to navigate from “MainPage” to the second page. So similarly we need to add a “Basic Page” template and give it the name “SecondPage.xaml”.
Figure 4
Adding a New Class
Now, we need to add another class named “Person.cs”. We'll create two person's objects, “Name” and “Blog”, that we'll when we navigate through pages.
Figure 5
And the code is given below.
- class Person
- {
- public string Name { get; set; }
- public string Blog { get; set; }
- }
Here, we'll create two string variables, “Name” and “Blog”. Just type “prop” and double-tab in the keyboard, it'll automatically create the full code snippet for you and tab again and change “int” to “string”, hit tab a second time and change “MyProperty” to “Name”. Likewise change the second code snippet.

Figure 6
Adding a Button Control
Now, we'll work in “MainPage.xaml”. Use a Button control and change the content to “Next Page” and the other property as in the following.
- <Button Content="Next Page"
- HorizontalAlignment="Left"
- Margin="10,0,0,0"
- VerticalAlignment="Top"
- Click="NextPage_Click"/>


Rahat YasirPosted Oct 30, 2014, 11:58 PM
Fixed the missing line.
Adi OchmannPosted Oct 19, 2014, 4:27 PM
You forgot Frame.Navigate(... And so, good articel