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
Partner Zones AWS Cloud
by AWS Developer Relations
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
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report

XNA Windows Phone Theme Library

Chris Smith user avatar by
Chris Smith
·
Feb. 29, 12 · Interview
Like (0)
Save
Tweet
Share
3.33K Views

Join the DZone community and get the full member experience.

Join For Free

If you've spent time developing games for Windows Phone using XNA, you've probably noticed it can be a bit of a pain to get the phone's theme color, particularly in comparison to how easy this task is with Silverlight.  Tired of dealing with this problem, Daniel Brown set out to correct this problem by creating a simple and easy to use library.

Here's the list of features from Daniel's site:

  • Get the following resources delivered to your XNA game code as an XNA colour
    • Phone Background Colour (Dark / Light)
    • Phone Accent Colour (Tile Colour)
    • Phone Border Colour
    • Phone Chrome Colour
    • Phone Contrast Background Colour (i.e. The opposite of the current background colour)
    • Phone Contrast Foreground Colour

  • Get the colour of any tile type. Don't want to have to remember the RGB values for all the possible colours? Now you don't have to.
    • WindowsPhoneTheme.blue will return you blue
    • Here are the other colours
      • blue
      • red
      • green
      • mango (orange)
      • pink
      • brown
      • lime
      • teal
      • purple
      • magenta

  • Simple Syntax
    • Just want the tile colour?

      getTileColour();


      Simple as that
    • Use intellisense for the other methods



The library and source file are available for download here, along with some simple instructions.

Windows Phone Library

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Using Swagger for Creating a PingFederate Admin API Java Wrapper
  • Steel Threads Are a Technique That Will Make You a Better Engineer
  • Journey to Event Driven, Part 1: Why Event-First Programming Changes Everything
  • 19 Most Common OpenSSL Commands for 2023

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: