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