Over a million developers have joined DZone.

Quick Tip: 32 Bits Per Pixel in Windows Phone App

DZone's Guide to

Quick Tip: 32 Bits Per Pixel in Windows Phone App

· Mobile Zone ·
Free Resource
Something new which came with Mango is the ability for developers to set the number of bits per pixel that our apps use.

By doing this, your app will have shiny graphics! This increase the color depth and then the gradient are rendered really more smoothly. As expert would say, there is no more banding in your image !

I have found a really great example picture on this web forum to show this :

Forcing your app to use 32 bits per pix is extremly simple to perform trough the WMAppManifest.xml file.

All you have to do is to set the value to 32 using the BitsPerPixel attribute on the App XML element.
Here is an exemple of it in my ConsoTracker WP7 app:

<App xmlns=""  BitsPerPixel="32" ProductID="{...}" Title="ConsoTracker"
   RuntimeType="Silverlight" Version="" Genre="apps.normal"
   Author="Jonathan ANTOINE" Description="Track your usage"

 You can find all the possible attributes of the App element on this page : http://msdn.microsoft.com/en-us/library/ff769509(v=vs.92).aspx


Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}