New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Plot when ItemsSource is collection and changes #406
Comments
I was thinking of doing it only for WPF. Do you think this pattern would fit other clients as well? |
All the other platforms are using the portably model only! |
Am I right in thinking that if we want to implement this for all the client types we would move the implementation done for WPF into the OxyPlot.Series.ItemsSeries class? |
Yes, I think it could also be implemented there. If the model should implement the observable pattern, I think it should be done everywhere, otherwise it may create a lot of confusion... |
It's a pity but the current portability settings mean that INotifyCollectionChanged is not available in the portable project. It's not supported for .NET frameworks before 4.5 and Silverlight 5. Have you run into this in OxyPlot before? |
Right, I guess this means it will be difficult to implement this feature... I don't want to include code that cannot be part of the portable library... |
We could add a collection changed interface in OxyPlot.dll... And a generic list class that implements the interface and supports batch add/insert/remove... E.g. an |
Interesting, it would be good to make it as explicit as possible in the API that you can use that interface. Maybe we could provide another alias property that is typed such as LiveItemsSource? |
If ItemsSource implements INotifyCollectionChanged we should update the plot view when the collection changes.
The text was updated successfully, but these errors were encountered: