際際滷

際際滷Share a Scribd company logo
BUILDING WINDOWS PHONE
APPLICATION
1. Handling Screen Orientation Changes
2. Supporting Multiple Screen Resolutions
3. Introduction to Localization
FOLLOW US
Twitter

: @chothanihitesh

際際滷share

: 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
HANDLING SCREEN
ORIENTATION CHANGES
PHONE UI DESIGN  ORIENTATION


This application does not work
in landscape mode at the
moment



Not all applications do, or need
to



You can configure applications
to support portrait or landscape
NEW DEVICE TAB IN VISUAL STUDIO 2012


View Designer in Portrait or Landscape
SELECTING ORIENTATIONS



A XAML property for the phone application page lets you select the

orientation options available


Your application can bind to an event which is fired when the
orientation changes
LAYOUT MAY NEED ALTERING
USING A GRID TO AID LANDSCAPE
LAYOUT
MOVE ELEMENTS IN LANDSCAPE LAYOUT



In Landscape, the recipe description moves into the second row and the
second column and the third row of the grid is now unused. Since that rows
Height is *, it shrinks to zero.
MOVING ELEMENTS
SUPPORTING MULTIPLE SCREEN
RESOLUTIONS
THREE SCREEN RESOLUTIONS
SO I HAVE TO DO THREE DIFFERENT UIS?


Well, No



As developers, we work with device independent pixels


OS applies a scale factor to the actual resolution
SCALED RESOLUTIONS
USE AUTO AND * ON GRID ROWS TO
ENSURE GOOD LAYOUT


Set Grid Row Height to Auto to
size according to the controls placed

within it


Set Grid Row Height to * to take
up all the rest of the space



If you size multiple rows using *,
available space is divided up evenly
between them
ADAPTIVE LAYOUT USING GRID
IMAGES


In most cases, you should supply images targeting the WXGA (1280 x
768) screen



Will automatically scale down on WVGA phones





WXGA assets are of the highest quality

Still look great on 720p (1280 x 720)

If you want, you can include images at each of the three resolutions in
your project


E.g. MyImage.wvga.png, MyImage.wxga.png and MyImage.720p.png



At runtime, get Application.Current.Host.Content.ScaleFactor to determine

the resolution of the screen on the current phone, returns 100 for WVGA, 160 for
WXGA and 150 for 720p


Write code to load image at runtime appropriate for the current screen resolution
SPLASH SCREENS


To add a splash screen to your project suitable for all resolutions, add a
file as content called SplashScreenImage.jpg at 768 x 1280 resolution


The framework automatically scales it to the correct size on different resolution
screens



If you want to provide pixel-perfect splash screens for all resolutions,

add images with the following names:



SplashScreenImage.Screen-WXGA.jpg





SplashScreenImage.Screen-WVGA.jpg

SplashScreenImage.Screen-720p.jpg

In addition to these images, you must still include the default
SplashScreenImage.jpg file
APP ICON AND TILES


You must supply app icon and tile images sized for WXGA



The framework automatically scales to the correct size for WVGA and
720p
INTRODUCTION TO
LOCALIZATION
WINDOWS PHONE 8 LANGUAGE SUPPORT


Windows Phone 8 supports 50 display
languages (shipped with the phone
depending on market and country/region)
and selectable by the user on the
language+region section of the Settings

page




Windows Phone 7.1 supported only 24

Windows Phone 8 allows you to build apps
that read from right to left
NEW PROJECT TEMPLATES HAVE
LOCALIZATION SUPPORT BUILT IN


Every new project you create in Visual Studio
2012 has a class included called LocalizedStrings


Simply provides programmatic access to resources



An instance of this is create in App.xaml in the
Application Resources with the key LocalizedStrings



Every new project also includes a resources file:

ResourcesAppResources.resx


Some strings already defined in here



Create all your string literals in here to support
localization



All new projects also included commented-out

code in MainPage.xaml.cs to setup a localized
Application Bar
ACCESSING STRING RESOURCES FROM
XAML


Databind the Text property
of your TextBlock and other
controls to the
StaticResource with a key
of LocalizedStrings



That is an instance of the
LocalizedStrings class



It provides access to string
resources
ADD SUPPORT FOR ADDITIONAL
LANGUAGES


Double-click project properties to
open the Properties editor



On the Application tab


Check each of the languages your app
will support



Save the Project Properties


Visual Studio creates new AppResources
files for each selected language/culture
TRANSLATE THE ADDITIONAL LANGUAGES
RESOURCE FILES


Visual Studio adds a resource file for each additional language that the
app will support. Each resource file is named using the correct
culture/language name, as described in Culture and language support
for Windows Phone in the documentation



For example:





For the culture Spanish (Spain), file is AppResources.es-ES.resx.
For the culture German (Germany), file is AppResources.de-DE.resx.

Supply appropriate translations in each resource file
DEFINE THE DEFAULT LANGUAGE


Double-click WMAppManifest.xml to
open the manifest editor



On the Packaging tab



Set the Default Language to the
language of your default resources


This identifies the language of the strings
in the default resources file. E.g., if the
strings in the default resources file are
English (UK) language strings, you
would select English (United Kingdom)
as the Neutral Language for the project
Thank You

More Related Content

Similar to Windows phone 8 session 6 (20)

Btb017 David
Btb017 DavidBtb017 David
Btb017 David
Rohit Ray
Android App Development 08 : Support Multiple Devices
Android App Development 08 : Support Multiple DevicesAndroid App Development 08 : Support Multiple Devices
Android App Development 08 : Support Multiple Devices
Anuchit Chalothorn
Make your PWA feel more like an app
Make your PWA feel more like an appMake your PWA feel more like an app
Make your PWA feel more like an app
nder Ceylan
Web application development process
Web application development processWeb application development process
Web application development process
John Smith
Windows phone 8 session 3
Windows phone 8 session 3Windows phone 8 session 3
Windows phone 8 session 3
hitesh chothani
pebble - Building apps on pebble
pebble - Building apps on pebblepebble - Building apps on pebble
pebble - Building apps on pebble
Aniruddha Chakrabarti
Windows phone 8 overview
Windows phone 8 overviewWindows phone 8 overview
Windows phone 8 overview
codeblock
21 app packaging, monetization and publication
21   app packaging, monetization and publication21   app packaging, monetization and publication
21 app packaging, monetization and publication
WindowsPhoneRocks
"Discover windows phone" 01. Project Template
"Discover windows phone"  01. Project Template"Discover windows phone"  01. Project Template
"Discover windows phone" 01. Project Template
Yasmine Abdelhady
Google Assistant Revolution
Google Assistant RevolutionGoogle Assistant Revolution
Google Assistant Revolution
Rafael Casuso Romate
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
james smith
Silverlight Training
Silverlight TrainingSilverlight Training
Silverlight Training
Subodh Pushpak
Titanium Meetup Deck
Titanium Meetup DeckTitanium Meetup Deck
Titanium Meetup Deck
sschwarzhoff
Chpater1
Chpater1Chpater1
Chpater1
Engleang Sam
Windows phone 8 session 2
Windows phone 8 session 2Windows phone 8 session 2
Windows phone 8 session 2
hitesh chothani
Google I/O 2016 replay - Android N Development
Google I/O 2016 replay - Android N DevelopmentGoogle I/O 2016 replay - Android N Development
Google I/O 2016 replay - Android N Development
Towhidul Haque Roni
Creating Flash Content for Multiple Screens
Creating Flash Content for Multiple ScreensCreating Flash Content for Multiple Screens
Creating Flash Content for Multiple Screens
paultrani
Progressive Web Apps - deep dive
Progressive Web Apps - deep diveProgressive Web Apps - deep dive
Progressive Web Apps - deep dive
Kenneth Rohde Christiansen
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces ApplicationsCastle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
Lucas Jellema
The Web Platform - State of the Union '17
The Web Platform - State of the Union '17The Web Platform - State of the Union '17
The Web Platform - State of the Union '17
Abdelrahman Omran
Btb017 David
Btb017 DavidBtb017 David
Btb017 David
Rohit Ray
Android App Development 08 : Support Multiple Devices
Android App Development 08 : Support Multiple DevicesAndroid App Development 08 : Support Multiple Devices
Android App Development 08 : Support Multiple Devices
Anuchit Chalothorn
Make your PWA feel more like an app
Make your PWA feel more like an appMake your PWA feel more like an app
Make your PWA feel more like an app
nder Ceylan
Web application development process
Web application development processWeb application development process
Web application development process
John Smith
Windows phone 8 session 3
Windows phone 8 session 3Windows phone 8 session 3
Windows phone 8 session 3
hitesh chothani
Windows phone 8 overview
Windows phone 8 overviewWindows phone 8 overview
Windows phone 8 overview
codeblock
21 app packaging, monetization and publication
21   app packaging, monetization and publication21   app packaging, monetization and publication
21 app packaging, monetization and publication
WindowsPhoneRocks
"Discover windows phone" 01. Project Template
"Discover windows phone"  01. Project Template"Discover windows phone"  01. Project Template
"Discover windows phone" 01. Project Template
Yasmine Abdelhady
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
james smith
Silverlight Training
Silverlight TrainingSilverlight Training
Silverlight Training
Subodh Pushpak
Titanium Meetup Deck
Titanium Meetup DeckTitanium Meetup Deck
Titanium Meetup Deck
sschwarzhoff
Windows phone 8 session 2
Windows phone 8 session 2Windows phone 8 session 2
Windows phone 8 session 2
hitesh chothani
Google I/O 2016 replay - Android N Development
Google I/O 2016 replay - Android N DevelopmentGoogle I/O 2016 replay - Android N Development
Google I/O 2016 replay - Android N Development
Towhidul Haque Roni
Creating Flash Content for Multiple Screens
Creating Flash Content for Multiple ScreensCreating Flash Content for Multiple Screens
Creating Flash Content for Multiple Screens
paultrani
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces ApplicationsCastle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
Lucas Jellema
The Web Platform - State of the Union '17
The Web Platform - State of the Union '17The Web Platform - State of the Union '17
The Web Platform - State of the Union '17
Abdelrahman Omran

Recently uploaded (20)

RRB ALP CBT 2 Mechanic Motor Vehicle Question Paper (MMV Exam MCQ)
RRB ALP CBT 2 Mechanic Motor Vehicle Question Paper (MMV Exam MCQ)RRB ALP CBT 2 Mechanic Motor Vehicle Question Paper (MMV Exam MCQ)
RRB ALP CBT 2 Mechanic Motor Vehicle Question Paper (MMV Exam MCQ)
SONU HEETSON
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
Administrative bodies( D and C Act, 1940
Administrative bodies( D and C Act, 1940Administrative bodies( D and C Act, 1940
Administrative bodies( D and C Act, 1940
P.N.DESHMUKH
Unit 1 Computer Hardware for Educational Computing.pptx
Unit 1 Computer Hardware for Educational Computing.pptxUnit 1 Computer Hardware for Educational Computing.pptx
Unit 1 Computer Hardware for Educational Computing.pptx
RomaSmart1
Hannah Borhan and Pietro Gagliardi OECD present 'From classroom to community ...
Hannah Borhan and Pietro Gagliardi OECD present 'From classroom to community ...Hannah Borhan and Pietro Gagliardi OECD present 'From classroom to community ...
Hannah Borhan and Pietro Gagliardi OECD present 'From classroom to community ...
EduSkills OECD
ASP.NET Web API Interview Questions By Scholarhat
ASP.NET Web API Interview Questions By ScholarhatASP.NET Web API Interview Questions By Scholarhat
ASP.NET Web API Interview Questions By Scholarhat
Scholarhat
ASP.NET Interview Questions PDF By ScholarHat
ASP.NET  Interview Questions PDF By ScholarHatASP.NET  Interview Questions PDF By ScholarHat
ASP.NET Interview Questions PDF By ScholarHat
Scholarhat
CMS letter to U.S. Representatives about House budget
CMS letter to U.S. Representatives about House budgetCMS letter to U.S. Representatives about House budget
CMS letter to U.S. Representatives about House budget
Mebane Rash
Dr. Ansari Khurshid Ahmed- Factors affecting Validity of a Test.pptx
Dr. Ansari Khurshid Ahmed- Factors affecting Validity of a Test.pptxDr. Ansari Khurshid Ahmed- Factors affecting Validity of a Test.pptx
Dr. Ansari Khurshid Ahmed- Factors affecting Validity of a Test.pptx
Khurshid Ahmed Ansari
DM_017 S.2025.pptx..............................
DM_017 S.2025.pptx..............................DM_017 S.2025.pptx..............................
DM_017 S.2025.pptx..............................
IrineAridedon
Intellectual Honesty & Research Integrity.pptx
Intellectual Honesty & Research Integrity.pptxIntellectual Honesty & Research Integrity.pptx
Intellectual Honesty & Research Integrity.pptx
NidhiSharma495177
Dot NET Core Interview Questions PDF By ScholarHat
Dot NET Core Interview Questions PDF By ScholarHatDot NET Core Interview Questions PDF By ScholarHat
Dot NET Core Interview Questions PDF By ScholarHat
Scholarhat
Full-Stack .NET Developer Interview Questions PDF By ScholarHat
Full-Stack .NET Developer Interview Questions PDF By ScholarHatFull-Stack .NET Developer Interview Questions PDF By ScholarHat
Full-Stack .NET Developer Interview Questions PDF By ScholarHat
Scholarhat
RRB ALP CBT 2 RAC Question Paper MCQ (Railway Assistant Loco Pilot)
RRB ALP CBT 2 RAC Question Paper MCQ (Railway Assistant Loco Pilot)RRB ALP CBT 2 RAC Question Paper MCQ (Railway Assistant Loco Pilot)
RRB ALP CBT 2 RAC Question Paper MCQ (Railway Assistant Loco Pilot)
SONU HEETSON
Interim Guidelines for PMES-DM-17-2025-PPT.pptx
Interim Guidelines for PMES-DM-17-2025-PPT.pptxInterim Guidelines for PMES-DM-17-2025-PPT.pptx
Interim Guidelines for PMES-DM-17-2025-PPT.pptx
sirjeromemanansala
MAT221: CALCULUS II | Transcendental Functions -Exponential and Logarithmic F...
MAT221: CALCULUS II | Transcendental Functions -Exponential and Logarithmic F...MAT221: CALCULUS II | Transcendental Functions -Exponential and Logarithmic F...
MAT221: CALCULUS II | Transcendental Functions -Exponential and Logarithmic F...
Josophat Makawa
BISNIS BERKAH BERANGKAT KE MEKKAH ISTIKMAL SYARIAH
BISNIS BERKAH BERANGKAT KE MEKKAH ISTIKMAL SYARIAHBISNIS BERKAH BERANGKAT KE MEKKAH ISTIKMAL SYARIAH
BISNIS BERKAH BERANGKAT KE MEKKAH ISTIKMAL SYARIAH
coacharyasetiyaki
Cyrus_Kelisha_SMM_PB1_2024-November.pptx
Cyrus_Kelisha_SMM_PB1_2024-November.pptxCyrus_Kelisha_SMM_PB1_2024-November.pptx
Cyrus_Kelisha_SMM_PB1_2024-November.pptx
KelishaCyrus
DM_017 S.2025.pptx.........................
DM_017 S.2025.pptx.........................DM_017 S.2025.pptx.........................
DM_017 S.2025.pptx.........................
IrineAridedon
1111.pptx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1111.pptx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1111.pptx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1111.pptx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Praksha3
RRB ALP CBT 2 Mechanic Motor Vehicle Question Paper (MMV Exam MCQ)
RRB ALP CBT 2 Mechanic Motor Vehicle Question Paper (MMV Exam MCQ)RRB ALP CBT 2 Mechanic Motor Vehicle Question Paper (MMV Exam MCQ)
RRB ALP CBT 2 Mechanic Motor Vehicle Question Paper (MMV Exam MCQ)
SONU HEETSON
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
Administrative bodies( D and C Act, 1940
Administrative bodies( D and C Act, 1940Administrative bodies( D and C Act, 1940
Administrative bodies( D and C Act, 1940
P.N.DESHMUKH
Unit 1 Computer Hardware for Educational Computing.pptx
Unit 1 Computer Hardware for Educational Computing.pptxUnit 1 Computer Hardware for Educational Computing.pptx
Unit 1 Computer Hardware for Educational Computing.pptx
RomaSmart1
Hannah Borhan and Pietro Gagliardi OECD present 'From classroom to community ...
Hannah Borhan and Pietro Gagliardi OECD present 'From classroom to community ...Hannah Borhan and Pietro Gagliardi OECD present 'From classroom to community ...
Hannah Borhan and Pietro Gagliardi OECD present 'From classroom to community ...
EduSkills OECD
ASP.NET Web API Interview Questions By Scholarhat
ASP.NET Web API Interview Questions By ScholarhatASP.NET Web API Interview Questions By Scholarhat
ASP.NET Web API Interview Questions By Scholarhat
Scholarhat
ASP.NET Interview Questions PDF By ScholarHat
ASP.NET  Interview Questions PDF By ScholarHatASP.NET  Interview Questions PDF By ScholarHat
ASP.NET Interview Questions PDF By ScholarHat
Scholarhat
CMS letter to U.S. Representatives about House budget
CMS letter to U.S. Representatives about House budgetCMS letter to U.S. Representatives about House budget
CMS letter to U.S. Representatives about House budget
Mebane Rash
Dr. Ansari Khurshid Ahmed- Factors affecting Validity of a Test.pptx
Dr. Ansari Khurshid Ahmed- Factors affecting Validity of a Test.pptxDr. Ansari Khurshid Ahmed- Factors affecting Validity of a Test.pptx
Dr. Ansari Khurshid Ahmed- Factors affecting Validity of a Test.pptx
Khurshid Ahmed Ansari
DM_017 S.2025.pptx..............................
DM_017 S.2025.pptx..............................DM_017 S.2025.pptx..............................
DM_017 S.2025.pptx..............................
IrineAridedon
Intellectual Honesty & Research Integrity.pptx
Intellectual Honesty & Research Integrity.pptxIntellectual Honesty & Research Integrity.pptx
Intellectual Honesty & Research Integrity.pptx
NidhiSharma495177
Dot NET Core Interview Questions PDF By ScholarHat
Dot NET Core Interview Questions PDF By ScholarHatDot NET Core Interview Questions PDF By ScholarHat
Dot NET Core Interview Questions PDF By ScholarHat
Scholarhat
Full-Stack .NET Developer Interview Questions PDF By ScholarHat
Full-Stack .NET Developer Interview Questions PDF By ScholarHatFull-Stack .NET Developer Interview Questions PDF By ScholarHat
Full-Stack .NET Developer Interview Questions PDF By ScholarHat
Scholarhat
RRB ALP CBT 2 RAC Question Paper MCQ (Railway Assistant Loco Pilot)
RRB ALP CBT 2 RAC Question Paper MCQ (Railway Assistant Loco Pilot)RRB ALP CBT 2 RAC Question Paper MCQ (Railway Assistant Loco Pilot)
RRB ALP CBT 2 RAC Question Paper MCQ (Railway Assistant Loco Pilot)
SONU HEETSON
Interim Guidelines for PMES-DM-17-2025-PPT.pptx
Interim Guidelines for PMES-DM-17-2025-PPT.pptxInterim Guidelines for PMES-DM-17-2025-PPT.pptx
Interim Guidelines for PMES-DM-17-2025-PPT.pptx
sirjeromemanansala
MAT221: CALCULUS II | Transcendental Functions -Exponential and Logarithmic F...
MAT221: CALCULUS II | Transcendental Functions -Exponential and Logarithmic F...MAT221: CALCULUS II | Transcendental Functions -Exponential and Logarithmic F...
MAT221: CALCULUS II | Transcendental Functions -Exponential and Logarithmic F...
Josophat Makawa
BISNIS BERKAH BERANGKAT KE MEKKAH ISTIKMAL SYARIAH
BISNIS BERKAH BERANGKAT KE MEKKAH ISTIKMAL SYARIAHBISNIS BERKAH BERANGKAT KE MEKKAH ISTIKMAL SYARIAH
BISNIS BERKAH BERANGKAT KE MEKKAH ISTIKMAL SYARIAH
coacharyasetiyaki
Cyrus_Kelisha_SMM_PB1_2024-November.pptx
Cyrus_Kelisha_SMM_PB1_2024-November.pptxCyrus_Kelisha_SMM_PB1_2024-November.pptx
Cyrus_Kelisha_SMM_PB1_2024-November.pptx
KelishaCyrus
DM_017 S.2025.pptx.........................
DM_017 S.2025.pptx.........................DM_017 S.2025.pptx.........................
DM_017 S.2025.pptx.........................
IrineAridedon
1111.pptx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1111.pptx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1111.pptx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1111.pptx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Praksha3

Windows phone 8 session 6

  • 1. BUILDING WINDOWS PHONE APPLICATION 1. Handling Screen Orientation Changes 2. Supporting Multiple Screen Resolutions 3. Introduction to Localization
  • 2. FOLLOW US Twitter : @chothanihitesh 際際滷share : 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
  • 4. PHONE UI DESIGN ORIENTATION This application does not work in landscape mode at the moment Not all applications do, or need to You can configure applications to support portrait or landscape
  • 5. NEW DEVICE TAB IN VISUAL STUDIO 2012 View Designer in Portrait or Landscape
  • 6. SELECTING ORIENTATIONS A XAML property for the phone application page lets you select the orientation options available Your application can bind to an event which is fired when the orientation changes
  • 7. LAYOUT MAY NEED ALTERING
  • 8. USING A GRID TO AID LANDSCAPE LAYOUT
  • 9. MOVE ELEMENTS IN LANDSCAPE LAYOUT In Landscape, the recipe description moves into the second row and the second column and the third row of the grid is now unused. Since that rows Height is *, it shrinks to zero.
  • 13. SO I HAVE TO DO THREE DIFFERENT UIS? Well, No As developers, we work with device independent pixels OS applies a scale factor to the actual resolution
  • 15. USE AUTO AND * ON GRID ROWS TO ENSURE GOOD LAYOUT Set Grid Row Height to Auto to size according to the controls placed within it Set Grid Row Height to * to take up all the rest of the space If you size multiple rows using *, available space is divided up evenly between them
  • 17. IMAGES In most cases, you should supply images targeting the WXGA (1280 x 768) screen Will automatically scale down on WVGA phones WXGA assets are of the highest quality Still look great on 720p (1280 x 720) If you want, you can include images at each of the three resolutions in your project E.g. MyImage.wvga.png, MyImage.wxga.png and MyImage.720p.png At runtime, get Application.Current.Host.Content.ScaleFactor to determine the resolution of the screen on the current phone, returns 100 for WVGA, 160 for WXGA and 150 for 720p Write code to load image at runtime appropriate for the current screen resolution
  • 18. SPLASH SCREENS To add a splash screen to your project suitable for all resolutions, add a file as content called SplashScreenImage.jpg at 768 x 1280 resolution The framework automatically scales it to the correct size on different resolution screens If you want to provide pixel-perfect splash screens for all resolutions, add images with the following names: SplashScreenImage.Screen-WXGA.jpg SplashScreenImage.Screen-WVGA.jpg SplashScreenImage.Screen-720p.jpg In addition to these images, you must still include the default SplashScreenImage.jpg file
  • 19. APP ICON AND TILES You must supply app icon and tile images sized for WXGA The framework automatically scales to the correct size for WVGA and 720p
  • 21. WINDOWS PHONE 8 LANGUAGE SUPPORT Windows Phone 8 supports 50 display languages (shipped with the phone depending on market and country/region) and selectable by the user on the language+region section of the Settings page Windows Phone 7.1 supported only 24 Windows Phone 8 allows you to build apps that read from right to left
  • 22. NEW PROJECT TEMPLATES HAVE LOCALIZATION SUPPORT BUILT IN Every new project you create in Visual Studio 2012 has a class included called LocalizedStrings Simply provides programmatic access to resources An instance of this is create in App.xaml in the Application Resources with the key LocalizedStrings Every new project also includes a resources file: ResourcesAppResources.resx Some strings already defined in here Create all your string literals in here to support localization All new projects also included commented-out code in MainPage.xaml.cs to setup a localized Application Bar
  • 23. ACCESSING STRING RESOURCES FROM XAML Databind the Text property of your TextBlock and other controls to the StaticResource with a key of LocalizedStrings That is an instance of the LocalizedStrings class It provides access to string resources
  • 24. ADD SUPPORT FOR ADDITIONAL LANGUAGES Double-click project properties to open the Properties editor On the Application tab Check each of the languages your app will support Save the Project Properties Visual Studio creates new AppResources files for each selected language/culture
  • 25. TRANSLATE THE ADDITIONAL LANGUAGES RESOURCE FILES Visual Studio adds a resource file for each additional language that the app will support. Each resource file is named using the correct culture/language name, as described in Culture and language support for Windows Phone in the documentation For example: For the culture Spanish (Spain), file is AppResources.es-ES.resx. For the culture German (Germany), file is AppResources.de-DE.resx. Supply appropriate translations in each resource file
  • 26. DEFINE THE DEFAULT LANGUAGE Double-click WMAppManifest.xml to open the manifest editor On the Packaging tab Set the Default Language to the language of your default resources This identifies the language of the strings in the default resources file. E.g., if the strings in the default resources file are English (UK) language strings, you would select English (United Kingdom) as the Neutral Language for the project