请参阅下面的代码,如何将IsolatedStorageFileStream-obj传输到IInputStream-obj?谢谢!
using(IsolatedStorageFileStream stream =
IsolatedStorageFile.GetUserStoreForApplication().OpenFile(".."), FileMode.Open))
{
await storedContact.SetDisplayPictureAsync(stream); // compile error
}
答案 0 :(得分:0)
在WP8上:
using System.IO;
using(IsolatedStorageFileStream stream = IsolatedStorageFile.GetUserStoreForApplication().OpenFile("..", FileMode.Open))
await storedContact.SetDisplayPictureAsync(stream.AsInputStream());