Represents a Progress Bar that also reports back a Rate
Inheritance: System.Windows.Controls.Primitives.RangeBase
Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
        /// <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);
        }
Esempio n. 3
0
        /// <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);
        }