Mobile Zone is brought to you in partnership with:

Jonathan creates software, mostly with C#, XAML, and HTML5/JS. He was awarded the Microsoft MVP in the "Client Application Development section in January 2011 Jon is a DZone MVB and is not an employee of DZone and has posted 20 posts at DZone. You can read more from them at their website. View Full User Profile

Quick Tip: 32 Bits Per Pixel in Windows Phone App

08.01.2012
| 1550 views |
  • submit to reddit
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="1.0.0.0" Genre="apps.normal"
   Author="Jonathan ANTOINE" Description="Track your usage"
   Publisher="ConsoTracker">
...
</App>

 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

Published at DZone with permission of Jon Antoine, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)