private async void DeleteFile_Click(object sender, RoutedEventArgs e) { if (SecureGridView.SelectedItem is FileSystemStorageItemBase Item) { QueueContentDialog Dialog = new QueueContentDialog { Title = Globalization.GetString("Common_Dialog_WarningTitle"), PrimaryButtonText = Globalization.GetString("Common_Dialog_ContinueButton"), Content = Globalization.GetString("QueueDialog_DeleteFile_Content"), CloseButtonText = Globalization.GetString("Common_Dialog_CancelButton") }; if ((await Dialog.ShowAsync().ConfigureAwait(true)) == ContentDialogResult.Primary) { await(await Item.GetStorageItem().ConfigureAwait(true)).DeleteAsync(StorageDeleteOption.PermanentDelete); SecureCollection.Remove(Item); } } }