예제 #1
0
        private static void OnValueFormatChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            LongUpDown numericBoxControl = sender as LongUpDown;

            if (numericBoxControl != null && (string)args.NewValue != (string)args.OldValue)
            {
                numericBoxControl.ValueFormat = (string)args.NewValue;
            }
        }
예제 #2
0
        private static void OnIncrementChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            LongUpDown numericBoxControl = sender as LongUpDown;

            if (numericBoxControl != null && (int)args.NewValue != (int)args.OldValue)
            {
                numericBoxControl.Increment = (int)args.NewValue;
            }
        }
예제 #3
0
        private static void OnMaximumChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            LongUpDown numericBoxControl = sender as LongUpDown;

            if (numericBoxControl != null && (long)args.NewValue != (long)args.OldValue)
            {
                numericBoxControl.Maximum = (long)args.NewValue;
            }
        }
예제 #4
0
        private static void OnValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            LongUpDown numericBoxControl = sender as LongUpDown;

            if (numericBoxControl != null && (long)args.NewValue != (long)args.OldValue)
            {
                numericBoxControl.Value = (long)args.NewValue;
                numericBoxControl.PART_NumericTextBox.Text = numericBoxControl.Value.ToString(numericBoxControl.ValueFormat);
                numericBoxControl.OnValueChanged((long)args.OldValue, (long)args.NewValue);
            }
        }