Cancel Async Task from a button
问题 What I need to do is be able to cancel a task that is running async. I have been searching and cannot seem to wrap my head around it. I just cant seem to discern how it would be implemented into my current setup. Here is my code that fires my task off. Any help on where or how to implement a cancellation token would be greatly appreciated. private async void startThread() { //do ui stuff before starting ProgressLabel.Text = String.Format("0 / {0} Runs Completed", index.Count()); ProgressBar