private static void CurrentValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { //Get access to the instance of CircularGaugeConrol whose property value changed NumbericLabel_Int gauge = d as NumbericLabel_Int; gauge.Foreground = ((bool)e.NewValue)?System.Windows.Media.Brushes.Green: System.Windows.Media.Brushes.Red; }
private static void CurrentValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { //Get access to the instance of CircularGaugeConrol whose property value changed NumbericLabel_Int gauge = d as NumbericLabel_Int; gauge.Content = e.NewValue.ToString(); }