Captura.NumericBox.NumericBox C# (CSharp) 메소드

NumericBox() 공개 메소드

public NumericBox ( ) : System.Windows
리턴 System.Windows
        public NumericBox()
        {
            InitializeComponent();

            CommandBindings.Add(new CommandBinding(IncreaseCommand,
                (s, e) => Value++,
                (s, e) => e.CanExecute = Value < Maximum));

            CommandBindings.Add(new CommandBinding(DecreaseCommand,
                (s, e) => Value--,
                (s, e) => e.CanExecute = Value > Minimum));

            TextBOX.InputBindings.Add(new InputBinding(IncreaseCommand, new KeyGesture(Key.Up)));
            TextBOX.InputBindings.Add(new InputBinding(DecreaseCommand, new KeyGesture(Key.Down)));

            Last = Value;
        }