문제

I am trying to download a file using StorageFile method CreateStreamedFileFromUriAsync but i am confused with IRandomAccessStreamReference parameter. How can I pass a IRandomAccessStreamReference? It is an interface. What sould I do?

public static IAsyncOperation<StorageFile> CreateStreamedFileFromUriAsync(
    string displayNameWithExtension, 
    Uri uri, 
    IRandomAccessStreamReference thumbnail
)
도움이 되었습니까?

해결책

I have found the answer:

IRandomAccessStreamReference thumbnail =
    RandomAccessStreamReference.CreateFromUri(new Uri(remoteUri));
IAsyncOperation<StorageFile> file1 =
    StorageFile.CreateStreamedFileFromUriAsync("duyuru.pdf", new Uri(remoteUri), thumbnail);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top