Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var embeddedImage = new Image { Aspect = Aspect.AspectFit };
- embeddedImage.Source = ImageSource.FromResource("applicationIcon.png");
- string localFileUri = string.Empty;
- // Get hold of the file system.
- IFolder localFolder = FileSystem.Current.LocalStorage;
- IFile file = await FileSystem.Current.GetFileFromPathAsync("applicationIcon.png");
- using (Stream stream = await file.OpenAsync(FileAccess.Read))
- {
- using (var ms = new MemoryStream())
- {
- var byteArray = ms.ToArray();
- var storeragePath = await iStorageService.SaveBinaryObjectToStorageAsync(string.Format(FileNames.ApplicationIcon, app.ApplicationId), byteArray);
- app.IconURLLocal = storeragePath;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement