What is the proper way of coding standard to bind the ObservableCollection to ItemSource?
The case i'm facing is i have multiple lineseries, therefore, i created an ObservableCollection<IEnumberable><T>> that contains array of ObservableCollection<T>. i make the ObservableCollection<IEnumberable><T>> binded to the itemsource of lineSeries with INotifyPropertyChanged.
Code Snippet:
XAML:
C#
i have an error "observablecollection collection was modified enumeration operation may not execute" using the code above.
is this the right way to bind it to multiple itemsource with only 1 Properties at real-time? any recommendation?
The case i'm facing is i have multiple lineseries, therefore, i created an ObservableCollection<IEnumberable><T>> that contains array of ObservableCollection<T>. i make the ObservableCollection<IEnumberable><T>> binded to the itemsource of lineSeries with INotifyPropertyChanged.
Code Snippet:
XAML:
<chartView:LineSeries x:Name="Item1" ItemsSource="{Binding Item[0]}" ValueBinding="Value" CategoryBinding="Counter" /><chartView:LineSeries x:Name="Item2" ItemsSource="{Binding Item[1]}" ValueBinding="Value" CategoryBinding="Counter" /><chartView:LineSeries x:Name="Item3" ItemsSource="{Binding Item[2]}" ValueBinding="Value" CategoryBinding="Counter" /><chartView:LineSeries x:Name="Item4" ItemsSource="{Binding Item[3]}" ValueBinding="Value" CategoryBinding="Counter" /><chartView:LineSeries x:Name="Item5" ItemsSource="{Binding Item[4]}" ValueBinding="Value" CategoryBinding="Counter" />C#
public ObservableCollection<IEnumerable<GraphPlot>> Item{ get { return m_item; } set { m_item = value; OnPropertyChanged("Item"); }}i have an error "observablecollection collection was modified enumeration operation may not execute" using the code above.
is this the right way to bind it to multiple itemsource with only 1 Properties at real-time? any recommendation?