Updating Appointments in backgroundworker

2 posts, 0 answers
  1. Cameron
    Cameron avatar
    11 posts
    Member since:
    May 2015

    Posted 28 Jul 2015 Link to this post

    Hey,

    I am trying to get my appointments to update in a backgroundworker. I have the backgroundworker up and running but when I assign my appointments to the ObservableCollection on the viewmodel  in the RunWorkerCompleted and fire the NofityPropertyChanged I get an error "Must create DependencySource on same Thread as the DependencyObject." I do not get this error when notifying of changes to strings and ints. Do you know of any reasons why the NotifyPropertyChanged would not work. 

     Thanks

  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 30 Jul 2015 Link to this post

    Hi Cameron,

    What I can suggest you would be to check how our BusyIndicator First Look example is implemented (it loads the ScheduleView appointments through a BackgroundWorker):
    http://demos.telerik.com/silverlight/#BusyIndicator/FirstLook

    As for the exception you check the answers of the following forums and see if the proposed solutions will help.

    http://stackoverflow.com/questions/26012793/must-create-dependencysource-on-same-thread-as-the-dependencyobject-when-bind

    https://social.msdn.microsoft.com/Forums/en-US/9b96e34d-f7d4-41bb-b793-0cdc08fb3618/must-create-dependencysource-on-same-thread-as-the-dependencyobject?forum=wpf

    Hope this helps.

    Regards,
    Kalin
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top