private static void OnChartDataPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { BlockChartBase ch = sender as BlockChartBase; ch.CoerceValue(ChartDataProperty); ch.CoerceValue(ChartDataSourceProperty); ch._reDraw(); }
private static void OnChartDataSourcePropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { BlockChartBase chart = (sender as BlockChartBase); if (chart.ChartDataSource == null) { List <IList <int> > list = new List <IList <int> >(); list.Add(chart.ChartData); } chart._reDraw(); }
private static object CoerceChartDataSourceProperty(DependencyObject sender, object value) { BlockChartBase chart = sender as BlockChartBase; if (ChartDataSourceProperty == null) { IList <IList <int> > list = new List <IList <int> >(); list.Add(chart.ChartData); return(list); } return(value); }