I need to play music file from the isolated storage. i did by this way,
MediaElement media = new MediaElement();
using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
{
using (IsolatedStorageFileStream fileStream = myIsolatedStorage.OpenFile(FileName, FileMode.Open, FileAccess.Read))
{
media.SetSource(fileStream);
media.Play();
}
}
I can't play the music file. When i created media element Xaml and set source that element this works fine. The problem is, i have to create all controls dynamically.
Pls suggest me how to resolve this pblm...
Thanks