i have Observable collection object bounded to a treeView:
MainTreeView.ItemsSource = ((App)Application.Current).TucOC;
the problem is that when i’m updating the ((App)Application.Current).TucOC this way:
_tucActivity.Add(new TucActivity(TucActivityEnum.Approve, null));
i get the following error:
This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread.
You can manipulate wpf objects only from UI thread. The error you get states you did it from a different thread.
Simply get the Dispatcher from Application.Current, and call
from it