问题
I'm using WPF with Firebase to work with data.
When I use the following code to reveal all data to Datagrid:
void ShowProducts()
{
var products = client
.Child("freshfish")
.AsObservable<Products>();
ProductsDataGrid.ItemsSource = products
.ObserveOnDispatcher()
.AsObservableCollection();
}
It works well, but after a few minutes it duplicates all the records once again.
Here's how it looks:
Any ideas?
来源:https://stackoverflow.com/questions/61240052/observeondispatcher-duplicates-records