BetterExplorer.PieChart.Legend.ObserveBoundCollectionChanges C# (CSharp) Method

ObserveBoundCollectionChanges() private method

Iterates over the items inthe bound collection, adding handlers for PropertyChanged events
private ObserveBoundCollectionChanges ( ) : void
return void
        private void ObserveBoundCollectionChanges()
        {
            Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal,
                                                    (ThreadStart)(() =>
                                                    {
                                                        CollectionView myCollectionView = (CollectionView)CollectionViewSource.GetDefaultView(this.DataContext);

                                                        foreach (object item in myCollectionView)
                                                        {
                                                            if (item is INotifyPropertyChanged)
                                                            {
																(item as INotifyPropertyChanged).PropertyChanged += new PropertyChangedEventHandler(ItemPropertyChanged);
                                                            }
                                                        }
                                                    }));
        }