Cancel BeginInvoke in WPF

In WPF, I call This.Dispatcher.BeginInvoke (DispatcherPriority.SystemIdle, mydelegete);

Is there a way to cancel the BeginInvoke method later?

thanks

+3
source share
1 answer

Dispatcher.BeginInvokereturns an object DispatcherOperation. If you keep a link to it, you can use its method Abortto delete the operation if it is not already running.

+7
source

Source: https://habr.com/ru/post/1713715/


All Articles