ComponentOne DateTimeEditors for WPF and Silverlight
Setting the Value Increment
C1TimeEditor Control Help > C1TimeEditor Task-Based Help > Setting the Value Increment

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:

  1. Click the C1TimeEditor control once to select it.
  2. In the Properties window, locate the Increment property and enter "01:30:00" into its text box.
  3. 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:

  1. Add Increment="01:30:00" to the <my:C1TimeEditor> tag so that the markup resembles the following:
    <my:C1TimeEditor Increment="01:30:00"/>
    
  2. 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:         

  1. Open the Window1.xaml.cs page.
  2. 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);
    

     

  3. Run the project and click the increase time button . Observe that time jumps ahead by one hour and thirty minutes.