How I Can Refresh ListView in WPF

后端 未结 5 458
死守一世寂寞
死守一世寂寞 2020-12-05 17:37

Hi I am using WPF and adding records one by one to the listview.ItemsSource. My data will appear when all the data is included, but I want to show the data as it is added o

5条回答
  •  生来不讨喜
    2020-12-05 18:24

        ObservableCollection items = new ObservableCollection();
        lvUsers.ItemsSource = items;
    
        for (int i = 0; i < 100; i++)
        {
            items.Add(i);
        }            
    

    No need refresh

提交回复
热议问题