SlideShare a Scribd company logo
1 of 12
BUILDING WINDOWS PHONE
APPLICATIONS
Page Navigation
FOLLOW US
Twitter

: @chothanihitesh

Slideshare

: http://www.slideshare.net/Chothani-Hitesh

Email

: chothani.hitesh@gmail.com

Support

: windows.chothani@live.com

LinkedIn

: in.linkedin.com/pub/hiteshchothani/6b/311/2b8

W8 Publisher

: AppStudios

WP Publisher : AppStudios
Website

: www.appmobinfotech.com
FRAME AND PAGE


•Frame


Top-level container control



PhoneApplicationFrame class



Contains the page control and system
elements such as system tray and

application bar


Page


Fills entire content region of the frame



PhoneApplicationPage-derived class



Contains a title



Optionally surfaces its own application bar
PAGE NAVIGATION


XAML apps on Windows Phone

use a page-based navigation
model


Similar to web page model



Each page identified by a URI



Each page is essentially stateless
NAVIGATING BACK


Application can provide controls to

navigate back to preceding page


The hardware Back key will also
navigate back to preceding page


No code required – built-in behaviour
OVERRIDING BACK KEY


•May need to override Back hardware key if ‘back to previous page’ is
not logical behaviour


For example, when displaying a popup panel



User would expect Back key to close the panel, not the page
OVERRIDING THE BACK KEY
PASSING DATA BETWEEN PAGES


Can pass string data between pages using query strings



On destination page
PASSING OBJECTS BETWEEN PAGES


Often, you will pass a data object from one page to another


E.g., user selects an item in a list and navigates to a Details
page



One solution is to store your ViewModel (that is, data) in
your App class




Global to whole application

Pass the ID of the selected item in query string
HANDLING NON LINEAR NAVIGATION


Design your app navigation strategy carefully!



If you navigate from ‘third page’ to ‘main page’
and your user then presses the Back key, what
happens?





User expects app to exit
App actually navigates back to Third Page

Solution for Windows Phone 7.0 was complex
code to handle back navigation correctly, or the
Non-Linear Navigation Recipe library from

AppHub


Windows Phone APIs:


NavigationService.RemoveBackEntry()
NAVIGATIONSERVICE.REMOVEBACKENTRY()


When ‘Third Page’ navigates back to MainPage, put a marker in the query string



In OnNavigatedTo() in MainPage, look for the marker and if present, remove the ‘ Third Page’,
‘SecondPage’ and original instance of ‘MainPage’ from the navigation history stack
Thank You

More Related Content

Viewers also liked

Windows phone 8 session 8
Windows phone 8 session 8Windows phone 8 session 8
Windows phone 8 session 8hitesh chothani
 
Windows phone 8 session 10
Windows phone 8 session 10Windows phone 8 session 10
Windows phone 8 session 10hitesh chothani
 
Windows phone 8 session 9
Windows phone 8 session 9Windows phone 8 session 9
Windows phone 8 session 9hitesh chothani
 
Windows phone 8 session 5
Windows phone 8 session 5Windows phone 8 session 5
Windows phone 8 session 5hitesh chothani
 
Windows phone 8 session 6
Windows phone 8 session 6Windows phone 8 session 6
Windows phone 8 session 6hitesh chothani
 
Windows phone 8 session 11
Windows phone 8 session 11Windows phone 8 session 11
Windows phone 8 session 11hitesh chothani
 
Windows phone 8 session 7
Windows phone 8 session 7Windows phone 8 session 7
Windows phone 8 session 7hitesh chothani
 

Viewers also liked (7)

Windows phone 8 session 8
Windows phone 8 session 8Windows phone 8 session 8
Windows phone 8 session 8
 
Windows phone 8 session 10
Windows phone 8 session 10Windows phone 8 session 10
Windows phone 8 session 10
 
Windows phone 8 session 9
Windows phone 8 session 9Windows phone 8 session 9
Windows phone 8 session 9
 
Windows phone 8 session 5
Windows phone 8 session 5Windows phone 8 session 5
Windows phone 8 session 5
 
Windows phone 8 session 6
Windows phone 8 session 6Windows phone 8 session 6
Windows phone 8 session 6
 
Windows phone 8 session 11
Windows phone 8 session 11Windows phone 8 session 11
Windows phone 8 session 11
 
Windows phone 8 session 7
Windows phone 8 session 7Windows phone 8 session 7
Windows phone 8 session 7
 

Similar to BUILD WINDOWS PHONE APPS

03.Controls in Windows Phone
03.Controls in Windows Phone03.Controls in Windows Phone
03.Controls in Windows PhoneNguyen Tuan
 
Navigation guidelines on Windows Modern UI
Navigation guidelines on Windows Modern UINavigation guidelines on Windows Modern UI
Navigation guidelines on Windows Modern UIMaria Nasioti
 
Windows Phone 8 - 3 Building WP8 Applications
Windows Phone 8 - 3 Building WP8 ApplicationsWindows Phone 8 - 3 Building WP8 Applications
Windows Phone 8 - 3 Building WP8 ApplicationsOliver Scheer
 
Design for charms & contracts
Design for charms & contractsDesign for charms & contracts
Design for charms & contractsMaria Nasioti
 
Deep linking slides
Deep linking slidesDeep linking slides
Deep linking slidesPersonagraph
 
How to: A starters guide for app development on Apple Watch
How to: A starters guide for app development on Apple WatchHow to: A starters guide for app development on Apple Watch
How to: A starters guide for app development on Apple WatchSoftTeco
 
An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)rudigrobler
 
mobile application development -unit-3-
mobile application development  -unit-3-mobile application development  -unit-3-
mobile application development -unit-3-TejamFandat
 
Android - Day3.pptx
Android - Day3.pptxAndroid - Day3.pptx
Android - Day3.pptxcurtaincall1
 
Drupalcamp LA Aug 2009
Drupalcamp LA Aug 2009Drupalcamp LA Aug 2009
Drupalcamp LA Aug 2009Tom Deryckere
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Developmentjames smith
 
Going mobile with Kentico CMS
Going mobile with Kentico CMSGoing mobile with Kentico CMS
Going mobile with Kentico CMSThomas Robbins
 
Wp quality bar tedy
Wp quality bar   tedyWp quality bar   tedy
Wp quality bar tedyAgate Studio
 
Mobile app development converted
Mobile app development convertedMobile app development converted
Mobile app development convertedSandy Gupta
 
Creating a content managed facebook app
Creating a content managed facebook appCreating a content managed facebook app
Creating a content managed facebook appOS-Cubed, Inc.
 
Application Design - Part 2
Application Design - Part 2Application Design - Part 2
Application Design - Part 2Kelley Howell
 
Introduction to Android development - Presentation
Introduction to Android development - PresentationIntroduction to Android development - Presentation
Introduction to Android development - PresentationAtul Panjwani
 

Similar to BUILD WINDOWS PHONE APPS (20)

03.Controls in Windows Phone
03.Controls in Windows Phone03.Controls in Windows Phone
03.Controls in Windows Phone
 
Navigation guidelines on Windows Modern UI
Navigation guidelines on Windows Modern UINavigation guidelines on Windows Modern UI
Navigation guidelines on Windows Modern UI
 
Windows Phone 8 - 3 Building WP8 Applications
Windows Phone 8 - 3 Building WP8 ApplicationsWindows Phone 8 - 3 Building WP8 Applications
Windows Phone 8 - 3 Building WP8 Applications
 
Design for charms & contracts
Design for charms & contractsDesign for charms & contracts
Design for charms & contracts
 
Deep linking slides
Deep linking slidesDeep linking slides
Deep linking slides
 
Rich Windows 8 apps
Rich Windows 8 appsRich Windows 8 apps
Rich Windows 8 apps
 
How to: A starters guide for app development on Apple Watch
How to: A starters guide for app development on Apple WatchHow to: A starters guide for app development on Apple Watch
How to: A starters guide for app development on Apple Watch
 
An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)
 
mobile application development -unit-3-
mobile application development  -unit-3-mobile application development  -unit-3-
mobile application development -unit-3-
 
Android - Day3.pptx
Android - Day3.pptxAndroid - Day3.pptx
Android - Day3.pptx
 
Android ui with xml
Android ui with xmlAndroid ui with xml
Android ui with xml
 
Drupalcamp LA Aug 2009
Drupalcamp LA Aug 2009Drupalcamp LA Aug 2009
Drupalcamp LA Aug 2009
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
 
Going mobile with Kentico CMS
Going mobile with Kentico CMSGoing mobile with Kentico CMS
Going mobile with Kentico CMS
 
Wp quality bar tedy
Wp quality bar   tedyWp quality bar   tedy
Wp quality bar tedy
 
Mobile app development converted
Mobile app development convertedMobile app development converted
Mobile app development converted
 
Creating a content managed facebook app
Creating a content managed facebook appCreating a content managed facebook app
Creating a content managed facebook app
 
Application Design - Part 2
Application Design - Part 2Application Design - Part 2
Application Design - Part 2
 
Introduction to Android development - Presentation
Introduction to Android development - PresentationIntroduction to Android development - Presentation
Introduction to Android development - Presentation
 
iPhone Lunch And Learn
iPhone Lunch And LearniPhone Lunch And Learn
iPhone Lunch And Learn
 

Recently uploaded

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 

Recently uploaded (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 

BUILD WINDOWS PHONE APPS

  • 2. FOLLOW US Twitter : @chothanihitesh Slideshare : http://www.slideshare.net/Chothani-Hitesh Email : chothani.hitesh@gmail.com Support : windows.chothani@live.com LinkedIn : in.linkedin.com/pub/hiteshchothani/6b/311/2b8 W8 Publisher : AppStudios WP Publisher : AppStudios Website : www.appmobinfotech.com
  • 3. FRAME AND PAGE  •Frame  Top-level container control  PhoneApplicationFrame class  Contains the page control and system elements such as system tray and application bar  Page  Fills entire content region of the frame  PhoneApplicationPage-derived class  Contains a title  Optionally surfaces its own application bar
  • 4. PAGE NAVIGATION  XAML apps on Windows Phone use a page-based navigation model  Similar to web page model  Each page identified by a URI  Each page is essentially stateless
  • 5. NAVIGATING BACK  Application can provide controls to navigate back to preceding page  The hardware Back key will also navigate back to preceding page  No code required – built-in behaviour
  • 6. OVERRIDING BACK KEY  •May need to override Back hardware key if ‘back to previous page’ is not logical behaviour  For example, when displaying a popup panel  User would expect Back key to close the panel, not the page
  • 8. PASSING DATA BETWEEN PAGES  Can pass string data between pages using query strings  On destination page
  • 9. PASSING OBJECTS BETWEEN PAGES  Often, you will pass a data object from one page to another  E.g., user selects an item in a list and navigates to a Details page  One solution is to store your ViewModel (that is, data) in your App class   Global to whole application Pass the ID of the selected item in query string
  • 10. HANDLING NON LINEAR NAVIGATION  Design your app navigation strategy carefully!  If you navigate from ‘third page’ to ‘main page’ and your user then presses the Back key, what happens?    User expects app to exit App actually navigates back to Third Page Solution for Windows Phone 7.0 was complex code to handle back navigation correctly, or the Non-Linear Navigation Recipe library from AppHub  Windows Phone APIs:  NavigationService.RemoveBackEntry()
  • 11. NAVIGATIONSERVICE.REMOVEBACKENTRY()  When ‘Third Page’ navigates back to MainPage, put a marker in the query string  In OnNavigatedTo() in MainPage, look for the marker and if present, remove the ‘ Third Page’, ‘SecondPage’ and original instance of ‘MainPage’ from the navigation history stack