Пример #1
0
        private static async Task ProcessSharedImage(IRandomAccessStream stream, ShareOperation operation, string fileName)
        {
            var canvasData = await ImageWriterService.StreamToCanvasData(stream, fileName);

            operation.ReportDataRetrieved();
            NavigateToMain(canvasData);
        }
Пример #2
0
 public static async Task OnFileActivated(FileActivatedEventArgs args)
 {
     foreach (var f in args.Files)
     {
         if (f is StorageFile storageFile)
         {
             using (var stream = await storageFile.OpenReadAsync())
             {
                 await ImageWriterService.StreamToCanvasData(stream, storageFile.DisplayName);
             }
         }
     }
 }