Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected override void OnCollectionChanged ( System.Collections.Specialized.NotifyCollectionChangedEventArgs e )
- {
- var dlgCollectionChangedDispatcher = CollectionChangedDispatcher;
- if ( dlgCollectionChangedDispatcher != null )
- Runner.RunOnDispatcherThreadSync ( ( ) => dlgCollectionChangedDispatcher ( this, e ) );
- var dlgCollectionChangedNormal = CollectionChangedNormal;
- if ( dlgCollectionChangedNormal != null )
- dlgCollectionChangedNormal ( this, e );
- }
- private event System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChangedNormal;
- private event System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChangedDispatcher;
- public override event System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged
- {
- add
- {
- if ( Dispatcher.Thread == System.Threading.Thread.CurrentThread )
- CollectionChangedDispatcher += value;
- else
- CollectionChangedNormal += value;
- }
- remove
- {
- if ( Dispatcher.Thread == System.Threading.Thread.CurrentThread )
- CollectionChangedDispatcher -= value;
- else
- CollectionChangedNormal -= value;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement