Setting the Value Increment
In This Topic
By default, the time on a C1TimeEditor control is set to move in one minute increments. You can change this by setting the C1TimeEditor.Increment property to whatever time increment you specify. In this topic, you will set the time increment on the C1TimeEditor control to one hour and thirty minutes. For more information about time increments, visit the Value Increment topic.
In the Designer
Complete the following steps:
- Click the C1TimeEditor control once to select it.
- In the Properties window, locate the C1TimeEditor.Increment property and enter "01:30:00" into its text box.
- Run the project and click the increase time button. Observe that time jumps ahead by one hour and thirty minutes.
In XAML
Complete the following steps:
- Add Increment="01:30:00" to the <DateTimeEditors:C1TimeEditor>tag so that the markup resembles the following:
| Markup |
Copy Code
|
<DateTimeEditors:C1TimeEditor Increment="01:30:00"/>
|
- Run the project and click the increase time button. Observe that time jumps ahead by one hour and thirty minutes.
In Code
Complete the following steps:
- Open the MainPage.xaml.cs page.
- Place the following code beneath the InitializeComponent() method:
| Visual Basic |
Copy Code
|
C1TimeEditor1.Increment= New TimeSpan(01,30,00)
|
| C# |
Copy Code
|
C1TimeEditor1.Increment= new TimeSpan(01,30,00);
|
- Run the project and click the increase time button . Observe that time jumps ahead by one hour and thirty minutes.
See Also