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; } }
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; } }
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; } }
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); } }