In terms of speed and the amount of notifications generated, is this code:
ObservableCollection<Foo> foo = new ObservableCollection<Foo>(bar);
this.SomeProperty = foo;
the same as:
this.SomeProperty = new ObservableCollection<Foo>();
foreach (var v in bar)
{
this.SomeProperty.Add(v);
}
If they are the same, is it possible to somehow turn off the notifications generated?
Objective: I'm trying to speed up the display of Telerik RadChart in silverlight. It seems to take a while to display (and freezes the in browser app) even after the property containing ObservableCollection is set. Once the chart is drawn everything works correctly.