private static void OnCurrentValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { //Get access to the instance of CircularGaugeConrol whose property value changed GaugeControl gauge = d as GaugeControl; gauge.OnCurrentValueChanged(e); }
private static void OnOptimalRangeStartValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { //Get access to the instance of CircularGaugeConrol whose property value changed GaugeControl gauge = d as GaugeControl; //if ((double)e.NewValue < gauge.MinValue) //{ // gauge.OptimalRangeStartValue = gauge.MinValue; //} gauge.OptimalRangeStartValue = (double)e.NewValue; }
private static void OnOptimalRangeEndValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { //Get access to the instance of CircularGaugeConrol whose property value changed GaugeControl gauge = d as GaugeControl; gauge.OptimalRangeEndValue = (double)e.NewValue; if ((double)e.NewValue > gauge.MaxValue) { gauge.OptimalRangeEndValue = gauge.MaxValue; } }