Dispatcher.BeginInvoke and Dispatcher.Invoke
Diffrence Between Dispatcher.BeginInvoke and Dispatcher.Invoke In WPF. When do we use both the method with example.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Shweta LodhaRank #31 · 39.8K reputationPosted Jun 9, 2015, 12:45 AM EDT
Invoke is Synchronous whereas BeginInvoke is Asynchronous, which means in case of Invoke, control will not return to the calling object until the callback returns. If you are OK with blocking calls, then you can choose Invoke.
A nice sample code is given at: http://tech.pro/tutorial/800/working-with-the-wpf-dispatcher
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Jun 9, 2015, 12:54 AM EDT