XNA Windows Phone Theme Library
Join the DZone community and get the full member experience.
Join For FreeIf 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
- Just want the tile colour?
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.
Comments