static object CoerceProgressValue(DependencyObject d, object baseValue) { ProgressBarControl control = (ProgressBarControl)d; double value = (double)baseValue; if (MathHelper.AreEqual(control.IndeterminateValue, value)) { return(baseValue); } if (value < control.Minimum) { return(control.Minimum); } if (value > control.Maximum) { return(control.Maximum); } return(baseValue); }
static void OnProgressValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ProgressBarControl control = (ProgressBarControl)d; control.OnProgressValueChanged(e); }