/// <summary> /// Called when maximum rate changes. /// </summary> /// <param name="d">The DependencyObject (RateBase).</param> /// <param name="e">The <see cref="System.Windows.DependencyPropertyChangedEventArgs"/> instance containing the event data.</param> private static void OnMaximumRateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { RateBase element = (RateBase)d; element.CoerceValue(RateProperty); element.OnMaximumRateChanged((double)e.OldValue, (double)e.NewValue); }
/// <summary> /// Coerces the maximum rate. /// </summary> /// <param name="d">The d.</param> /// <param name="value">The value.</param> /// <returns></returns> private static object CoerceMaximumRate(DependencyObject d, object value) { RateBase element = (RateBase)d; double minimum = element.RateMinimum; if (((double)value) < minimum) { return(minimum); } return(value); }
/// <summary> /// Called when the caption changes. /// </summary> /// <param name="d">The DependencyObject (RateBase).</param> /// <param name="e">The <see cref="System.Windows.DependencyPropertyChangedEventArgs"/> instance containing the event data.</param> private static void OnCaptionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { RateBase element = (RateBase)d; element.OnCaptionChanged((String)e.OldValue, (String)e.NewValue); }