1
這是我的代碼。Windows Phone - 媒體庫
MediaLibrary myMediaLibrary = new MediaLibrary();
Uri myUri = new Uri(@"Images/Jellyfish.jpg", UriKind.Relative);
System.IO.Stream photoStream = App.GetResourceStream(myUri).Stream;
byte[] buffer = new byte[photoStream.Length];
photoStream.Read(buffer, 0, Convert.ToInt32(photoStream.Length));
myMediaLibrary.SavePicture("Jellyfish.jpg", buffer);
在模擬器上一切都被保存。但在設備上顯示錯誤「發生意外錯誤」。