Hello,
In my application I need to update the ItemsSource every few seconds, I would like to know what would be the best way to perform this.
I might have up to 600 items divides
I have an ObervableCollection object, every time I receive new data I clear the ObervableCollection object and then I add the new data, something like this:
ObservableCollection<myData> myCollection = new ObservableCollection<myData>(); // Format the data the way I need it myCollection.Clear(); foreach (myObject item in DataObject){ myCollection.Add(new myData() { property1 = item.property1, property2 = item.property2, property3 = item.property3 // Operations for other properties });}I wonder if it would be better to update my ObervableCollection object (update existing items, add the new ones, and delete those that no longer exist) than clear and add all again.
What I want to achieve is to reduce the rendering time.
I hope you can give me some advice.
Thanks in advance,
Alberto
