Observablecollection not updating

Many Thanks Dai Hello Dai, I was able to make this work with a small modification to your example code.You have a nicely structured MVVM application there by the way 🙂So – you created a class called Annotation Creation Modifier, which was binding to Observable Collection in your view-model.Hi, I have been adding annotations to a chart as per your example with a few modifications.My annotations collection is updated from the constructor and from an On Load handler but not after this.Also I would advise against re-buiding annotations on each re-draw.This can cause performance problems, since adding an annotation could in fact trigger a redraw!Please find the updated Annotation Modifier code below.

observablecollection not updating-77observablecollection not updating-24observablecollection not updating-8

The elements of each group are projected by using a specified function.(Defined by Enumerable.)Overloaded.In the Annotation Creation Modifier code you need to subscribe to the Observable Collection&;t Report Tag.Collection Changed event and rebuild your annotations there.Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.(Defined by Enumerable.)Overloaded.Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.(Defined by Enumerable.)Overloaded.They are later updated by the call to On Parent Surface Rendered.

You must have an account to comment. Please register or login here!