Suppose I have this data grid:
<DataGrid x:Name="MyGrid" AutoGenerateColumns="True" ItemsSource="{Binding MyObservableList}"></DataGrid>
Suppose I have this Loop:
for (int i = 0; i < 10; i++)
{
MyObservableList.Add(i.ToString());
Console.WriteLine(i.ToString());
Thread.Sleep(500);
}
Is possible to change the wpf list immediately after the item is inserted? Like "Console.Write" code? I tried lots of stuff like implementing "CollectionChanged" or "INotifyPropertyChanged" but they only update the DataGrid when the loop ends. Note: the objective is update the DataGrid from a ObservableCollection during the loop process. Any example with any kind of observable list is ok.