There are often cases that raisePropertyChanged() Method is called outside UI main thread.
Is it okay to call it in this way, or should I use Dispathcer.Invoke()?
1 Answer, 1 is accepted
0
Martin Ivanov
Telerik team
answered on 09 May 2022, 11:57 AM
Hello Jiwon,
It is better to use Dispatcher.Invoke or Dispatcher.BeginInvoke. Any change related to the UI should be made on the main UI thread. Otherwise, WPF throws an InvalidOperationException.
InvalidOperationException: The calling thread cannot access this object because a different thread owns it.