This is a mirror of official site: http://jasper-net.blogspot.com/

Access to Windows Phone 7 Camera Roll from a

| Monday, March 7, 2011
Or “Why is my RootPictureAlbum null?”
Download the code for this example.
In order to get programmatic access to the available media libraries on Windows Phone 7, you need to use some XNA libraries even in a Silverlight application.  I will give an example of how to use legal APIs from XNA.  I will also utilize the WP Connect tool that was part of the October 2010 Update to the Developer Tools to test my application on a WP7 device.
The fist thing to do is create a blank Windows Phone 7 application. Add a reference to the Microsoft.Xna.Framework assembly to that application.

6560.image_5F00_thumb_5F00_1586AA21.png

This is not a a violation of the Certification Requirements.  As of this writing, section 4.2.5 of the Certification Requirements forbids calling APIs in Microsoft.Xna.Framework.Game or Microsoft.Xna.Framework.Graphics.  We will be using Microsoft.Xna.Framework.Media only.
I’ve just created a toy example to do this, but it is sufficient for our purposes here.  I should note that this application will not work in the Emulator.  You have to have a device to run it.  Here’s what it looks like …

1273.image_5F00_thumb_5F00_6C9B9517.png

Read more: Nicewords

Posted via email from Jasper-net

0 comments: