Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

XNA Windows Phone Theme Library

DZone's Guide to

XNA Windows Phone Theme Library

· Mobile Zone
Free Resource

Discover how to focus on operators for Reactive Programming and how they are essential to react to data in your application.  Brought to you in partnership with Wakanda

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.

Learn how divergent branches can appear in your repository and how to better understand why they are called “branches".  Brought to you in partnership with Wakanda

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}