Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }