private static object CoerceDefaultValue(DependencyObject d, object baseValue) { ExtendedSlider ctrl = (ExtendedSlider)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 OnDefaultValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ExtendedSlider ctrl = (ExtendedSlider)d; ctrl.OnDefaultValueChanged((double)e.OldValue, (double)e.NewValue); }