Dispatcher.Invoke(() => { // Set property or change UI compomponents. });
Dispatcher.BeginInvoke(new Action(UpdateControls));
References
https://stephenhaunts.com/2015/06/12/update-a-wpf-ui-from-another-thread/
https://stackoverflow.com/questions/19009174/dispatcher-invoke-vs-begininvoke-confusion/
https://medium.com/criteo-engineering/switching-back-to-the-ui-thread-in-wpf-uwp-in-modern-c-5dc1cc8efa5e