Cross Thread Exception in PropertyChangedEvent in WPF

Posted by Ashish Ashu on Stack Overflow See other posts from Stack Overflow or by Ashish Ashu
Published on 2010-05-14T06:31:55Z Indexed on 2010/05/14 6:34 UTC
Read the original article Hit count: 402

Filed under:
|
|

I have a ListView that is binded to my custom collection.

At run time , I am updating the certain properties of my entity in my custom collection in my ViewModel. At the same time , I am also doing the custom sorting in the listview.

The custom sorting is applicable when I click on the any column header of the listview.

For example, I am updating the current datetime on my entity on every 5 seconds and simulaneously , I am applying custom sorting based on DateTime.

(The Listview is third party control).

Hence I am doing two operations on my custom collection at the same time.

Should I pass the dispatcher of my control in the view model and call any methods ( which updates any entity in my custom collection ) through UI dispatcher ?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about multithreading