private static double GetLimitedValue(Spinner spinner, double value) { value = Math.Max(spinner.Minimum, value); value = Math.Min(spinner.Maximum, value); return(value); }
static void OnFormatChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { Spinner spinner = (Spinner)d; spinner.ValueToTextBoxText(); }