(X) Hide this Join our next live webcast on December 15th, 10 am PDT - Building a Silverlight 4 application end-to-end. Presenter: Gill Cleeren
Check the webinar agenda | Register for the webinar
Skip Navigation LinksHome / News / View News

Playing Music Files on WP7

+ Add to SilverlightShow Favorites
0 comments   /   posted by Silverlight Show on Nov 25, 2010
(0 votes)

SilverlightShow Page for all Silverlight and Windows Phone 7 (WP7) things on TwitterCharles Petzold discusses the ability of Windows Phone 7 application to access and play music files.

Source: Petzold Book Blog

It is possible for a Windows Phone 7 application to access and play MP3 or WMA files that are stored as either content in the application or referenced over the internet. Such a file becomes an instance of the Song class that you instantiate with the Song.FromUri method. The URI references the file.

Song is an XNA class but you can use it in a Silverlight program. You'll need a reference to the Microsoft.Xna.Framework DLL — ignore the warning message; you are, after all a trained perfessional and you know what you're doing — and you'll want a using directive for the Microsoft.Xna.Framework.Media namespace.

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 1 and 2 and type the answer here: