I have a WPF application which incorporates the MVVM pattern. I have a viewmodel class which basically has two properties:
The values of Mapcollection and Joints are set using a BackgroundWorker. When the data has been fetched, the GetAlertCompleted function is fired and the Mapcollection and Joints properties are set. This consequently fires the OnPropertyChanged() function of the view model
And in the main window I have:The problem is that when I assign the first property of the RadChart ( for example ItemsSource), I cant set the SeriesMappings property and I receive this error "The calling thread cannot access this object because a different thread owns it". I have no idea why this error is being raised. If I can set one property, why cant I set the second one. And it also doesnt matter in which order they are assigned. Once the first is assigned, I get an error for the second one.
I would appreciate if you could point out where the problem might be. Thanks.