ComponentOne Basic Library for UWP
Basic Library Overview / Input for UWP / Input for UWP Task-Based Help / C1NumericBox Task-Based Help / Setting the Increment Value
In This Topic
    Setting the Increment Value
    In This Topic

    The C1NumericBox.Increment property determines by how much the C1NumericBox.Value property changes when the Up or Down button is pressed at run time. By default the C1NumericBox control starts with its C1NumericBox.Increment set to 1 but you can customize this number.

    At Design Time

    To set the C1NumericBox.Increment property, complete the following steps:

    1. Click the C1NumericBox control once to select it.
    2. Navigate to the Properties tab, and enter a number, for example "20", in the text box next to the C1NumericBox.Increment property.

    This will set the C1NumericBox.Increment property to the number you chose.

    In XAML

    For example, to set the C1NumericBox.Increment property to 20 addIncrement="20" to the <Xaml:C1NumericBox> tag so that it appears similar to the following:

    Markup
    Copy Code
    <Xaml:C1NumericBox x:Name="C1NumericBox1" Increment="20"></Xaml:C1NumericBox>
    

    In Code

    For example, to set the C1NumericBox.Increment property to 20 add the following code to your project:

    Visual Basic
    Copy Code
    C1NumericBox1.Increment = 20
    

     

    C#
    Copy Code
    c1NumericBox1.Increment = 20;
    

    Run your project and observe:

    Press the Up and then the Down button a few times. Notice that the C1NumericBox.Value changes in steps of 20. You can still edit the value directly by selecting the text box and entering a number that falls between that step.

    See Also