Setting the Start Value

The Value property determines the currently selected number. By default the C1NumericBox control starts with its Value set to 0 but you can customize this number at design time, in XAML, and in code.

At Design Time

To set the Value property at run time, complete the following steps:

1.   Click the C1NumericBox control once to select it.

2.   Navigate to the Properties window, and enter a number, for example "123", in the text box next to the Value property.

This will set the Value property to the number you chose.

In XAML

For example, to set the Value property add Value="123" to the <c1:C1NumericBox> tag so that it appears similar to the following:

<c1:C1NumericBox Height="21.96" HorizontalAlignment="Right" Margin="0,16,105,0" Name="C1NumericBox1" VerticalAlignment="Top" Width="111.01" Value="123" />

In Code

For example, to set the Value property add the following code to your project:

      Visual Basic

      C#

Run your project and observe:

Initially 123 (or the number you chose) will appear in the control:

 


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.