Home > Net >  WPF, update the ListBox ItemsSource, isn't it interface card
WPF, update the ListBox ItemsSource, isn't it interface card

Time:04-20

Update the ListBox ItemsSource, whether will card interface, even if is to get the data asynchronously? Because be interact with the UI, are you?
I now is very card, as follows:
 
Private async void Refresh ()
{
Await Task. Run (()=& gt;
{
.
.//data computing
Itemsource=new ObservableCollection (fronts);//this step card
});
}

Is there any way to solve this problem
  •  Tags:  
  • C#