Exemple #1
0
 /// <summary>
 /// Validates the <see cref="Minimum"/> property.
 /// </summary>
 /// <param name="sender">The RangeBase control.</param>
 /// <param name="value">The value.</param>
 /// <returns>The coerced value.</returns>
 private static double ValidateMinimum(RangeBase sender, double value)
 {
     ValidateDouble(value, "Minimum");
     return value;
 }
Exemple #2
0
 /// <summary>
 /// Validates/coerces the <see cref="Value"/> property.
 /// </summary>
 /// <param name="sender">The RangeBase control.</param>
 /// <param name="value">The value.</param>
 /// <returns>The coerced value.</returns>
 private static double ValidateValue(RangeBase sender, double value)
 {
     ValidateDouble(value, "Value");
     return MathUtilities.Clamp(value, sender.Minimum, sender.Maximum);
 }
Exemple #3
0
 /// <summary>
 /// Validates/coerces the <see cref="Maximum"/> property.
 /// </summary>
 /// <param name="sender">The RangeBase control.</param>
 /// <param name="value">The value.</param>
 /// <returns>The coerced value.</returns>
 private static double ValidateMaximum(RangeBase sender, double value)
 {
     ValidateDouble(value, "Maximum");
     return Math.Max(value, sender.Minimum);
 }
Exemple #4
0
 /// <summary>
 /// Validates the <see cref="Minimum"/> property.
 /// </summary>
 /// <param name="sender">The RangeBase control.</param>
 /// <param name="value">The value.</param>
 /// <returns>The coerced value.</returns>
 private static double ValidateMinimum(RangeBase sender, double value)
 {
     ValidateDouble(value, "Minimum");
     return(value);
 }
Exemple #5
0
 /// <summary>
 /// Validates/coerces the <see cref="Value"/> property.
 /// </summary>
 /// <param name="sender">The RangeBase control.</param>
 /// <param name="value">The value.</param>
 /// <returns>The coerced value.</returns>
 private static double ValidateValue(RangeBase sender, double value)
 {
     ValidateDouble(value, "Value");
     return(MathUtilities.Clamp(value, sender.Minimum, sender.Maximum));
 }
Exemple #6
0
 /// <summary>
 /// Validates/coerces the <see cref="Maximum"/> property.
 /// </summary>
 /// <param name="sender">The RangeBase control.</param>
 /// <param name="value">The value.</param>
 /// <returns>The coerced value.</returns>
 private static double ValidateMaximum(RangeBase sender, double value)
 {
     ValidateDouble(value, "Maximum");
     return(Math.Max(value, sender.Minimum));
 }