A RangeBase control has a Value that can be set between the Minimum and Maximum properties. The RangeBase visually indicates its Value.
Property Validation and Coercion
The RangeBase control uses property coercion to ensure that the Minimum, Maximum, and Value properties preserve the relation Minimum ≤ Value ≤ Maximum. Coercion affects the return value of each property and not the value of its associated field. If the conditions causing coercion are removed, the return value of each property once again reflects the true value of its associated field.
Property validation and coercion rules are identical to those of the Windows Presentation Foundation (WPF) RangeBase control and are summarized in the following list. Rule precedence is in the following order.
1. Attempting to set Minimum, Maximum, Value, SmallChange, or LargeChange to NaN, NegativeInfinity, or PositiveInfinity raises an ArgumentException.
2. Attempting to set SmallChange or LargeChange to a value less than zero raises an ArgumentException.
3. The following property coercion rules apply.
If Value < Minimum, then Value = Minimum
The following table shows an example sequence of property settings and the resulting values for Minimum, Maximum, and Value.
| Action | Minimum | Maximum | Value |
| Original settings | Local = 15 Property = 15 | Local = 100 Property = 100 | Local =30 Property = 30 |
| Set Minimum = 200 | Local = 200 Property = 200 | Local = 100 Property = 200 | Local = 30 Property = 200 |
| Set Value = 45 | Local = 200 Property = 200 | Local = 100 Property = 200 | Local = 45 Property = 200 |
| Set Minimum = 0 | Local = 0 Property = 0 | Local = 100 Property = 100 | Local = 45 Property = 45 |