Exemple #1
0
 static void OnDataSourcePropertyChanged(BindableObject bindable, object oldValue, object newValue)
 {
     SerialChart chart = bindable as SerialChart;
     DetachOldDataSourceCollectionChangedListener(chart, oldValue);
     AttachDataSourceCollectionChangedListener(chart, newValue);
     chart.NotifyDataSourceChanges();
 }
Exemple #2
0
 static void OnColorPropertyChanged(BindableObject bindable, object oldValue, object newValue)
 {
     SerialChart chart = bindable as SerialChart;
     chart.NotifyColorChanges();
 }
Exemple #3
0
 static void AttachDataSourceCollectionChangedListener(SerialChart chart, object dataSource)
 {
     if (dataSource != null && dataSource is INotifyCollectionChanged)
         (dataSource as INotifyCollectionChanged).CollectionChanged += new NotifyCollectionChangedEventHandler(chart.OnDataSourceCollectionChanged);
 }
Exemple #4
0
 static void DetachOldDataSourceCollectionChangedListener(SerialChart chart, object dataSource)
 {
     if (dataSource != null && dataSource is INotifyCollectionChanged)
         (dataSource as INotifyCollectionChanged).CollectionChanged -= chart.OnDataSourceCollectionChanged;
 }