Ignore:
Timestamp:
Aug 12, 2011, 4:32:33 PM (13 years ago)
Author:
bayral
Message:

root category handled

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PiwigoLib/PiwigoWpf/DTO/AsyncObservableCollection.cs

    r11911 r11935  
    88{
    99    public class AsyncObservableCollection<T> : ObservableCollection<T>
    10     {
    11         private SynchronizationContext _synchronizationContext = SynchronizationContext.Current;
     10    {       
    1211
    1312        public AsyncObservableCollection()
     
    2221        protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
    2322        {
    24             if (SynchronizationContext.Current == _synchronizationContext)
     23            if (SynchronizationContext.Current == PwgModelManager.WPF_SynchronizationContext)
    2524            {
    2625                // Execute the CollectionChanged event on the current thread
     
    3029            {
    3130                // Send the CollectionChanged event on the creator thread
    32                 _synchronizationContext.Send(RaiseCollectionChanged, e);
     31                PwgModelManager.WPF_SynchronizationContext.Send(RaiseCollectionChanged, e);
    3332            }
    3433        }
     
    4241        protected override void OnPropertyChanged(PropertyChangedEventArgs e)
    4342        {
    44             if (SynchronizationContext.Current == _synchronizationContext)
     43            if (SynchronizationContext.Current == PwgModelManager.WPF_SynchronizationContext)
    4544            {
    4645                // Execute the PropertyChanged event on the current thread
     
    4948            else
    5049            {
    51                 // Post the PropertyChanged event on the creator thread
    52                 _synchronizationContext.Post(RaisePropertyChanged, e);
     50                // Send the PropertyChanged event on the creator thread
     51                PwgModelManager.WPF_SynchronizationContext.Send(RaisePropertyChanged, e);
    5352            }
    5453        }
Note: See TracChangeset for help on using the changeset viewer.