private static void valuetachanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ValueNodeControl Target = d as ValueNodeControl; bool NewVal = (bool)e.NewValue; if (NewVal) { Target.valut.Visibility = Visibility.Visible; } else { Target.valut.Visibility = Visibility.Collapsed; } }
private static void internalvalChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { //the internal value has changed, we need to update our control ValueNodeControl Target = d as ValueNodeControl; double Nieuw = (double)e.NewValue; //a minus must become before a symbol if (Nieuw < 0) { Target.digits.Content = Math.Abs(Nieuw); Target.Negative.Visibility = Visibility.Visible; } else { Target.digits.Content = Nieuw; Target.Negative.Visibility = Visibility.Collapsed; } }