In this step you'll begin in Visual Studio to create a WPF application using NumericBox for WPF. When you add a C1NumericBox control to your application, you'll have a complete, functional numeric editor. You can further customize the control to your application.
To set up your project and add a C1NumericBox control to your application, complete the following steps:
1. Create a new WPF project in Visual Studio.
2. Navigate to the Toolbox and double-click the C1NumericBox icon to add the control to Window1.
3. Click once on the C1NumericBox1 control to select it, and navigate to the Properties window.
4. In the Properties window, set the following properties:
Property | Value |
Width | 40 |
0 | |
9 |
The Width property will resize the control. The Minimum and Maximum properties will set the minimum and maximum values that are allowed in the control. Users will not be able to enter values outside of that range providing built-in data validation.
5. In the Design view, right-click the C1NumericBox1 control and select Copy.
6. Right-click the window and select Paste to create the C1NumericBox2 control with the same settings.
7. Repeat steps 5 and 6 three more times to create a total of five C1NumericBox controls.
8. In Design view, re-position each of the controls so that they appear next to each other and are numbered C1NumericBox1 to C1NumericBox5 from left to right.
Your application should now look similar to the following:
You've successfully created a WPF application, added C1NumericBox controls to the application, and customized those controls. In the next step you'll complete setting up the application.