MVVM / ObservableCollection Question

后端 未结 6 993
陌清茗
陌清茗 2021-01-19 15:32

I have the following XAML:

   
        

        
6条回答
  •  渐次进展
    2021-01-19 15:49

    ObservableCollection knows how to notify if the collection changes i.e. an item is added or removed.

    however, if you do the following:

    FamilyList = new ObservableCollection(); 
    // or
    FamilyList = GetFamilyList();
    

    then you are actually changing the property that holds your collection, which is different. I'm guessing this is the issue here.

提交回复
热议问题