InterviewSolution
| 1. |
How To Copy Image From Assets Folder To Local Storage In Windows 10 ? |
|
Answer» StorageFile ObjStorageFile = await StorageFile.GetFileFromApplicationUriAsync( NEW Uri("ms-appx:///Assets/MyImage.png")); await ObjStorageFile.CopyAsync(ApplicationData.Current.LocalFolder, "MyImage.png"); In above code while REFERENCING your APPLICATION image from asset folder, you MUST prefix application path with "ms-appx". StorageFile ObjStorageFile = await StorageFile.GetFileFromApplicationUriAsync( new Uri("ms-appx:///Assets/MyImage.png")); await ObjStorageFile.CopyAsync(ApplicationData.Current.LocalFolder, "MyImage.png"); In above code while referencing your application image from asset folder, you must prefix application path with "ms-appx". |
|