Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Control.Invoke and Dispatcher.Invoke

In WPF whats the difference between Dispatcher.Invoke and Invoke called directly on an instance of a control. As far as i understand the dispatcher is responsible for handling messages for a thread, so does Control.Invoke go on to call Dispatcher.Invoke?

like image 675
richzilla Avatar asked Feb 02 '26 06:02

richzilla


1 Answers

As far as I'm aware, WPF controls don't have Invoke methods normally. There's nothing in System.Windows.Controls.Control, for example. Windows Forms controls have an Invoke method, but then they don't have a dispatcher...

like image 51
Jon Skeet Avatar answered Feb 03 '26 21:02

Jon Skeet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!