public static object Input(DependencyObject d, object baseValue)//check input correctness for set { float? val = baseValue as float?; numbers current = d as numbers; if (val > current.MaxValue) { return(current.MaxValue); } else if (val < current.MinValue) { return(current.MinValue); } else { return(val); } //txtNum.Text = num == null ? "" : num.ToString(); }
public static void input2(DependencyObject d, DependencyPropertyChangedEventArgs e)//show on screen the changes from value(--/++) { numbers current = d as numbers; current.txtNum.Text = current.Value == null ? "" : current.Value.ToString(); }