Using ListCollectionView instead of ObservableCollection

Topics: Questions
Mar 24, 2013 at 4:48 AM
I used ListCollectionView instead of ObservableCollection. it works good in catel 3.4 but when i update my catel version into 3.5 it give an error:
No add-method available for event 'CollectionChanged', cannot subscribe using weak events. Make sure the event is public

this is my code:
protected override void Initialize()
        {
            base.Initialize();

            PleaseWaitService.Show(() =>
            {
                DataContext.SpecialPrices.Include(x => x.Customer).Include(x => x.Stuff).Load();
                SpecialPriceCollection = (ListCollectionView)CollectionViewSource.GetDefaultView(DataContext.SpecialPrices.Local);
            });
        }

        public ListCollectionView SpecialPriceCollection
        {
            get { return GetValue<ListCollectionView>(SpecialPriceCollectionProperty); }
            set { SetValue(SpecialPriceCollectionProperty, value); }
        }
        public static readonly PropertyData SpecialPriceCollectionProperty = RegisterProperty("SpecialPriceCollection", typeof(ListCollectionView));
Coordinator
Mar 25, 2013 at 7:02 PM
Please subscribe to this issue to be notified of updates.