async Task DisplaySomeTextFileContents(IStorageFile textFile) { if (textFile is null) { return; } ShowSpinner(); textFile.AccessDenialResponse = AccessDenialResponse.RequestAccess; if (await textFile.ReadAllTextAsync() is string text) { var result = $@"Path {textFile.Path} ContentType: {textFile.ContentType} Attributes: {textFile.Attributes} FileType: {textFile.FileType} DateCreated: {textFile.DateCreated} DateModified: {textFile.DateModified} Size: {textFile.Size} Name: {textFile.Name} CONTENT: "; await DisplayAlert("Text File Data", result + text.Substring(0, Math.Min(text.Length, 200)) + " ...", "ok"); //await DisplayPromptAsync("Text File Data", result + text.Substring(0, Math.Min(text.Length, 200)) + " ..."); } else { await DisplayError("Failed to get text from file [" + textFile?.Path + "]"); } HideSpinner(); }