ObserveOnDispatcher duplicates records

丶灬走出姿态 提交于 2020-06-17 12:57:18

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!