Share via


UWP: navigate from one page to other

Step 1: Mainpage

 Create project in Microsoft Visual Studio 2015 and go in MainPage.xaml

Step 2: Place Button

Drag and drop a Button in Grid from Toolbox and rename the Button name if you like.

http://4.bp.blogspot.com/-7ORLO8bhTPQ/VlhBz6nqlAI/AAAAAAAAAEE/PoPb-CmmAy0/s1600/1111.PNG

Step 3: New item

Right click on Your project name and click Add>New Item...

 

http://1.bp.blogspot.com/-_b7H6_BSBbg/Vlg8DvMub4I/AAAAAAAAADk/q2u3pYk8cS4/s1600/a1.PNG  

http://4.bp.blogspot.com/--zLfjfQIXdw/Vlg89IjrdlI/AAAAAAAAADo/CV9jOrQYN98/s1600/a2.PNG

Step 4: Add blank page

Add Blank Page

http://3.bp.blogspot.com/-_oVp8YvYBFo/Vlg9KjtyjvI/AAAAAAAAADw/MpSP4XcLyYU/s1600/a3.PNG

 Step 5: Blank page XAML

Open BlankPage1.xaml.

http://1.bp.blogspot.com/-iDR8SYk6pdo/VlhA68eQdkI/AAAAAAAAAD8/I3GYmWFKK2Y/s1600/a5.PNG

 

Step 6: Add button

 Drag and drop a Button in Grid from Toolbox and rename the Button name if you like.

 http://1.bp.blogspot.com/-R2MbCv2M39w/VlhB_cW_sXI/AAAAAAAAAEM/7s-fFmeylJU/s1600/222.PNG

 

Step 7: Add code

 Open MainPage.xaml.cs and write this code in it.

http://3.bp.blogspot.com/-GIAWrTvaiuQ/VlhDWKVn4oI/AAAAAAAAAEU/f2WCz5ZR2pU/s1600/aaaaaaaaa.PNG

Step 8: Blank page code

 Open BlankPage1.xaml.cs and write this code in it.

http://3.bp.blogspot.com/-11P08Iamdvc/VlhDhJ49oQI/AAAAAAAAAEc/phlo6sufy0k/s1600/bbbbbb.PNG

Step 9: Run project

 Run your project on Local Machine and it will be the output of your project.

http://1.bp.blogspot.com/-C4ddZI1S2_0/VlhD8ztPzuI/AAAAAAAAAEw/Mp6ih-cKwKU/s1600/a7.PNG

http://1.bp.blogspot.com/-JFEouYQ7zZs/VlhEK6foNDI/AAAAAAAAAE0/8SjL8u0QL6w/s1600/a8.PNG