DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Splash Screens in Windows 8

Michael Crump user avatar by
Michael Crump
·
Jan. 09, 13 · Interview
Like (0)
Save
Tweet
Share
5.64K Views

Join the DZone community and get the full member experience.

Join For Free

introduction

you may have noticed that after creating a new windows phone 8 application that the splashscreenimage.jpg does not exist in the project as it did in mango. since windows phone 8 apps are “ compiled in the cloud ”, there isn’t a whole lot of reasons to create a splash screen as apps load super fast already. but that doesn’t mean you can’t add one back to the project to help identify your “brand”. if you would like to use a splash screen in your windows phone 8 project, then it may be beneficial to look at the resolutions supported by the sdk first.

resolutions supported by windows phone 8

below is a list of screen resolutions supported by windows phone 8.

resolution

ratio

wvga (wide video graphics array)

480*800

15:9

wxga (wide extended graphics array) *new*

768*1280

15:9

720p *new*

720*1280

16:9

back to splash screens

you can create one image and name it splashscreenimage.jpg with a resolution of 768 x 1280 and call it done if you want. windows phone 8 will automatically scale the image depending on which phone is being used. however, you may also elect to create an image for each supported resolution (wvga, wxga, 720p to make it pixel perfect) and drop it in the root of your project with the following names.

  • splashscreenimage.screen-wvga.jpg
  • splashscreenimage.screen-720p.jpg
  • splashscreenimage.screen-wxga.jpg

take note here that if we add splashscreenimage.jpg along with all the other images that windows phone 8 will automatically use it instead of the resolution specific images.

you will also need to set the build action to “ content ” (which it did automatically when i added my image).

switching back to resolutions

if you choose to only support certain resolutions, then you may opt-out by going into the wmappmanifest.xml and unchecking the resolution that your app is not going to support.

image

getting the phones supported resolution through code

it may be useful to find out the current phones resolution is through code in instances where you may want to load other assets later in the applications lifecycle. you can do this with the following code snippet and examining the scalefactor value.

private void button_click_1(object sender, routedeventargs e)
{
      messagebox.show("height : " + application.current.host.content.actualheight.tostring() + system.environment.newline +
            "width : " + application.current.host.content.actualwidth.tostring() + system.environment.newline +
            "scale : " + application.current.host.content.scalefactor.tostring());
}

image

in this instance, i used the wvga 512mb emulator option.

the scale factor simply gets the value by which the application content area scales its content. this is the easiest way to see which resolution the user is using. if the scale factor is 100 then it is wvga, 150 is 720p, 160 then wxga.

or on the phone through settings then about

image

other helpful info

you can quickly check to see which resolution the image is inside of visual studio 2012 by double clicking on the image then clicking the properties button highlighted below. i’ve seen many presentations where the presenter left visual studio to show the width and height of the image. just thought i’d share.

image

conclusion

i hope this write-up helped as i’ve seen a lot of confusion around resolutions and splash screens in windows phone 8.


Windows Phone

Published at DZone with permission of Michael Crump. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Load Balancing Pattern
  • The 12 Biggest Android App Development Trends in 2023
  • Tech Layoffs [Comic]
  • Top 5 PHP REST API Frameworks

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: