Exemple #1
0
        private static void OnCurrentValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            //Get access to the instance of CircularGaugeConrol whose property value changed
            GaugeControl gauge = d as GaugeControl;

            gauge.OnCurrentValueChanged(e);
        }
Exemple #2
0
        private static void OnOptimalRangeStartValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            //Get access to the instance of CircularGaugeConrol whose property value changed
            GaugeControl gauge = d as GaugeControl;

            //if ((double)e.NewValue < gauge.MinValue)
            //{
            //    gauge.OptimalRangeStartValue = gauge.MinValue;
            //}
            gauge.OptimalRangeStartValue = (double)e.NewValue;
        }
Exemple #3
0
        private static void OnOptimalRangeEndValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            //Get access to the instance of CircularGaugeConrol whose property value changed
            GaugeControl gauge = d as GaugeControl;

            gauge.OptimalRangeEndValue = (double)e.NewValue;
            if ((double)e.NewValue > gauge.MaxValue)
            {
                gauge.OptimalRangeEndValue = gauge.MaxValue;
            }
        }