Beispiel #1
0
        private static void OnChartDataPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            BlockChartBase ch = sender as BlockChartBase;

            ch.CoerceValue(ChartDataProperty);
            ch.CoerceValue(ChartDataSourceProperty);
            ch._reDraw();
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
        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);
        }