示例#1
0
        private static object CoerceLogValue(DependencyObject d, object baseValue)
        {
            LogSlider ctrl  = (LogSlider)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);
        }
示例#2
0
        private static void OnLogValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            LogSlider ctrl = (LogSlider)d;

            ctrl.OnLogValueChanged((double)e.OldValue, (double)e.NewValue);
        }