Exemplo n.º 1
0
        private static void OnBrushSetPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ChartBase chart = d as ChartBase;

            if (chart != null)
            {
                chart.UpdateChartDisplay();
            }
        }
Exemplo n.º 2
0
        private static void OnDataPointsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ChartBase chart = d as ChartBase;

            if (chart == null)
            {
                return;
            }

            ObservableCollection <DataPoint> oldDataPoints = e.OldValue as ObservableCollection <DataPoint>;
            ObservableCollection <DataPoint> newDataPoints = e.NewValue as ObservableCollection <DataPoint>;

            if (oldDataPoints != null)
            {
                oldDataPoints.CollectionChanged -= chart.DataPoints_CollectionChanged;
            }

            if (newDataPoints != null)
            {
                newDataPoints.CollectionChanged += chart.DataPoints_CollectionChanged;
            }

            chart.UpdateChartDisplay();
        }