private static void ValueOnChang(DependencyObject sender, DependencyPropertyChangedEventArgs e) { NumberPicker Con = (NumberPicker)sender; int value = (int)e.NewValue; Con.Number = value; //Value跟随 Con.Change(); Con.button.Content = value.ToString() + Con.text; }
private static void MinOnChang(DependencyObject sender, DependencyPropertyChangedEventArgs e) { NumberPicker Con = (NumberPicker)sender; Con.MinValue = (int)e.NewValue; }
private static void TextOnChang(DependencyObject sender, DependencyPropertyChangedEventArgs e) { NumberPicker Con = (NumberPicker)sender; Con.text = (string)e.NewValue; }