Xaml:
<fluent:SplitButton Icon="24.png" ItemsSource="{Binding TestSource}">
ViewModel:
public ObservableCollection<List<TestModel>> TestSource { get; set; }
Update Method:
public void UpdateSource(ObservableCollection<List<TestModel>> newSource)
{
TestSource = newSource;
OnPropertyChanged("TestSource");
}
It works fine the first time, but when assigning the TestSource property to a new object, the list displays the old list, and don't get updated.
I just had a similar problem here, with the same split button control and all.
First, I recommend changing the declaration of
TestSourceto:Next, do not assign a new
ObjectCollectiontoTestSource.Instead, try this:
It seems like the
ObjectCollectionchanges are only triggered when manipulating it with its methods, not direct assignments.