private async Task ExecuteWithTracking(BackgroundTask task) { try { task.Status = BackgroundTaskStatus.Running; UpdateVisualStatus(); await task.ExecuteAsync(); task.Status = BackgroundTaskStatus.Succeeded; //remove from list on success //Tasks.Remove(task); } catch (Exception ex) { task.Error = ex; task.Status = BackgroundTaskStatus.Failed; } finally { //ClearAllCompletedCommand.RaiseCanExecuteChanged(); UpdateVisualStatus(); } }