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