public void Stop() { if (workItem != null && workItem.Status == Windows.Foundation.AsyncStatus.Started) { workItem.Cancel(); } }
void StopRenderLoop() { if (_renderLoopWorker != null) { _swapChainEvent.Set(); _renderLoopWorker.Cancel(); _renderLoopWorker = null; } }
private void Button_Click_3(object sender, RoutedEventArgs e) { try { task.Cancel(); } catch (System.NullReferenceException) {} }
/// <summary> /// Cancels posted PropertyChanged events if it is cancellable. /// This method must be called on the thread that the Dispatcher is associated with. /// </summary> protected virtual void CancelPostPropertyChanged() { if (_invokeAction == null) { return; } #if NICENIS_UWP _invokeAction.Cancel(); #else _invokeAction.Abort(); #endif _invokeAction = null; }