You can use the C1NumericBox.Minimum and C1NumericBox.Maximum properties to set a numeric range that users are limited to at run time. If the C1NumericBox.Minimum and C1NumericBox.Maximum properties are set, users will not be able to pick a number larger than the C1NumericBox.Minimum or smaller than the C1NumericBox.Maximum.
At Design Time
To set the C1NumericBox.Minimum and C1NumericBox.Maximum, complete the following steps:
This will set C1NumericBox.Minimum and C1NumericBox.Maximum values.
In XAML
To set the C1NumericBox.Minimum and C1NumericBox.Maximum in XAML addMaximum="500" Minimum="-500" to the <Xaml:C1NumericBox> tag so that it appears similar to the following:
| Markup |
Copy Code
|
|---|---|
<Xaml:C1NumericBox x:Name="C1NumericBox1" Maximum="500" Minimum="-500"></Xaml:C1NumericBox> |
|
In Code
To set the C1NumericBox.Minimum and C1NumericBox.Maximum add the following code to your project:
| Visual Basic |
Copy Code
|
|---|---|
C1NumericBox1.Minimum = -500 C1NumericBox1.Maximum = 500 |
|
| C# |
Copy Code
|
|---|---|
c1NumericBox1.Minimum = -500; c1NumericBox1.Maximum = 500; |
|
Run your project and observe:
Users will be limited to the selected range at run time.