/// <summary> /// Initializes a new instance of the <see cref="AxisBase<T>"/> class. /// </summary> /// <param name="axisControl">The axis control.</param> /// <param name="convertFromDouble">The convert from double.</param> /// <param name="convertToDouble">The convert to double.</param> protected AxisBase(AxisControl <T> axisControl, Func <double, T> convertFromDouble, Func <T, double> convertToDouble) { if (axisControl == null) { throw new ArgumentNullException("axisControl"); } if (convertFromDouble == null) { throw new ArgumentNullException("convertFromDouble"); } if (convertToDouble == null) { throw new ArgumentNullException("convertToDouble"); } this.convertToDouble = convertToDouble; this.convertFromDouble = convertFromDouble; this.axisControl = axisControl; axisControl.MakeDependent(); axisControl.ConvertToDouble = convertToDouble; axisControl.ScreenTicksChanged += axisControl_ScreenTicksChanged; Content = axisControl; Binding binding = new Binding("Background"); binding.Source = this; axisControl.SetBinding(Control.BackgroundProperty, binding); Loaded += OnLoaded; }
public void Dispose() { owner.updateOnCommonChange = true; owner.UpdateUIRepresentation(); owner = null; }
public UpdateRegionHolder(AxisControl <TT> owner) { this.owner = owner; owner.updateOnCommonChange = false; }