private async void LstAttachments_ItemSelected(object sender, SelectedItemChangedEventArgs e) { try { if (e.SelectedItem == null) { return; } Attachment att = (Attachment)e.SelectedItem; lstAttachments.SelectedItem = null; string attDir = GetAttachmentDir(this.inboxMessage); string file = fileSystem.JoinPaths(attDir, FileHelper.SanitizeFileName(att.NomeArquivo)); att.Loading = true; bool fileExists = fileSystem.FileExists(file); using (var stream = fileSystem.GetFileStream(file)) { if (!fileExists || stream.Length < att.Tamanho) { await HttpRequest.DownloadFileToStream(EndPointHelper.GetAbsoluteUrl(att.Url), stream); stream.Flush(); } } att.Loading = false; ShareViewModel share = new ShareViewModel(); share.FileName = file; share.MimeType = att.MimeType; share.Share(); } catch (Exception ex) { await DisplayAlert(AppResources.APP_TITLE, ex.Message, AppResources.OK); } }