/// <summary> /// AxisProperty property changed handler. /// </summary> /// <param name="oldValue">Old value.</param> /// <param name="newValue">New value.</param> private void OnAxisPropertyChanged(DisplayAxis oldValue, DisplayAxis newValue) { Debug.Assert(newValue != null, "Don't set the axis property to null."); if (newValue != null) { newValue.RegisteredListeners.Add(this); } if (oldValue != null) { oldValue.RegisteredListeners.Remove(this); } }
/// <summary> /// Initializes a new instance of the OrientedAxisGridLines class. /// </summary> /// <param name="displayAxis">The axis to draw grid lines for.</param> public OrientedAxisGridLines(DisplayAxis displayAxis) : base(displayAxis) { _gridLinePool = new ObjectPool<Line>(() => new Line { Style = Axis.GridLineStyle }); }
/// <summary> /// Instantiates a new instance of the DisplayAxisGridLines class. /// </summary> /// <param name="axis">The axis used by the DisplayAxisGridLines.</param> public DisplayAxisGridLines(DisplayAxis axis) { this.Axis = axis; this.SizeChanged += new SizeChangedEventHandler(OnSizeChanged); }