Share your content and reach out to more developers by submitting them at Abundantcode.com - Developer Community Site

How to Copy Image from Assets folder to localstorage in Windows 10 ?

If you want to copy a file or image from a folder to localstorage in Windows 10 , you can use the CopyAsync method of the StorageFile class to do it.

How to Copy Image from Assets folder to localstorage in Windows 10 ?

StorageFile file1 = await StorageFile.GetFileFromApplicationUriAsync(
    new Uri("ms-appx:///Assets/image1.png"));

await file1.CopyAsync(ApplicationData.Current.LocalFolder, "image1.png");
Tags :

Leave Your Comment