Ejemplo n.º 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);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
            }
        }