How can I assign ringtone from Windows Phone 7 system library to Alarm in my app

How can I assign ringtone from Windows Phone 7 system library to Alarm in my app.?

Right now, app uses predefined ringtone set by me shown below. But i want that app user can set ringtone of his/her choice for alarm.

alarm.Sound = new Uri("/Ringtones/Ring01.wma", UriKind.Relative);

As stated in the MSDN documentation: "The Sound URI must point to a file packaged in the application’s .xap file."... The only system sound you can use is the default Alarm sound, which you get by leaving Sound property null.

Copyright © 2007-2012 www.chuibin.com Chuibin Copyright