private static object CoerceLogValue(DependencyObject d, object baseValue) { LogSlider ctrl = (LogSlider)d; double value = (double)baseValue; double min = ctrl.Minimum; if (value < min) { return(min); } double max = ctrl.Maximum; if (value > max) { return(max); } return(value); }
private static void OnLogValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { LogSlider ctrl = (LogSlider)d; ctrl.OnLogValueChanged((double)e.OldValue, (double)e.NewValue); }