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.
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 …
Read more: Nicewords
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.
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 …
Read more: Nicewords