コード例 #1
0
        internal void OnScaleBreakChanged(ChartAxisScaleBreaks newValue, ChartAxisScaleBreaks oldValue)
        {
            if (newValue != null)
            {
                newValue.CollectionChanged += OnScaleBreakCollectionChanged;
                foreach (var scalebreak in newValue)
                {
                    scalebreak.PropertyChanged += Scalebreak_PropertyChanged;
                    if (axisPanel != null && !axisPanel.Children.Contains(scalebreak))
                    {
                        axisPanel.Children.Add(scalebreak);
                    }
                }
            }

            if (oldValue != null)
            {
                oldValue.CollectionChanged -= OnScaleBreakCollectionChanged;
                foreach (var scalebreak in oldValue)
                {
                    scalebreak.PropertyChanged -= Scalebreak_PropertyChanged;
                    if (axisPanel != null && axisPanel.Children.Contains(scalebreak))
                    {
                        axisPanel.Children.Remove(scalebreak);
                    }
                }
            }

            UpdateArea();
        }
コード例 #2
0
 public NumericalAxis()
 {
     Breaks          = new ChartAxisScaleBreak();
     AxisScaleBreaks = new ChartAxisScaleBreaks();
     BreakShapes     = new List <FrameworkElement>();
     BreakRangesInfo = new Dictionary <DoubleRange, ChartAxisScaleBreak>();
 }