コード例 #1
0
        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);
        }
コード例 #2
0
        static void OnProgressValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ProgressBarControl control = (ProgressBarControl)d;

            control.OnProgressValueChanged(e);
        }