Search code examples
c#uwpwindows-community-toolkit

MasterDetailsView not updating on INotifyPropertyChanged events


I'm using a MasterDetailsView from the UWP Community Toolkit. The data is hold by my custom ObservableCollection<T>. If I add or remove items from the list, an update gets triggerd and the MasterDetailsView shows the new list.

But if change a property of an item (e.g. chat, image, ...) of the list, the MasterDetailsView won't update to the new list. It just triggers the PropertyChanged event of the ObservableCollection<T>.

It seams like the MasterDetailsView is not subscribed to the PropertyChanged events of the ObservableCollection<T>.

Is there a way to get arround of this?

=> Link to my implementation of the MasterDetailsView (.xaml)

=> Link to my implementation of the MasterDetailsView (.cs)


Solution

  • Set bind Mode = OneWay in binding

    ItemsSource="{x:Bind chatsList, Mode = OneWay}"
    Chat="{x:Bind chat, Mode = OneWay}"
    Client="{x:Bind client, Mode = OneWay}"