private void OnCancel(object sender, RoutedEventArgs e) { if (_action != null && _action.Status == AsyncStatus.Started) { _action.Cancel(); } }
private void CancelButton_Click(object sender, RoutedEventArgs e) { _renderTask?.Cancel(); }