ComponentOne Input Library for WPF
Input Library Overview / NumericBox / Work with NumericBox / Input Validation
In This Topic
    Input Validation
    In This Topic

    You can use the Minimum and Maximum properties to set a numeric range that users are limited to at run time. If the Minimum and Maximum properties are set, users will not be able to pick a number smaller than the Minimum or larger than the Maximum.

    When setting the Minimum and Maximum properties, the Minimum should be smaller than the Maximum. Also be sure to set the Value property to a number within the Minimum and Maximum range.

    You can also choose a mode for range validation using the RangeValidationMode property. This property controls when the entered number is validated. You can set RangeValidationMode to one of the following options:

    Option Description
    Always This mode does not allow users to enter out of range values.
    AlwaysTruncate This mode does not allow users to enter out of range values. The value will be truncated if the limits are exceeded.
    OnLostFocus This mode truncates the value when the control loses focus.